InputDescriptorMappingObject.fromJson constructor

InputDescriptorMappingObject.fromJson(
  1. dynamic jsonObject
)

Implementation

InputDescriptorMappingObject.fromJson(dynamic jsonObject) {
  Map<String, dynamic> descriptor = credentialToMap(jsonObject);
  if (descriptor.containsKey('id')) {
    id = descriptor['id'];
  } else {
    throw Exception('Id property is needed in descriptor-Map Object');
  }

  if (descriptor.containsKey('format')) {
    format = descriptor['format'];
  } else {
    throw Exception('Format property is needed in descriptor-map object');
  }

  if (descriptor.containsKey('path')) {
    path = JsonPath(descriptor['path']);
  } else {
    throw Exception(' path property is needed in descriptor-map object');
  }
  _originalDoc = descriptor;
}