ServiceEndpoint.fromJson constructor

ServiceEndpoint.fromJson(
  1. dynamic jsonObject
)

Implementation

ServiceEndpoint.fromJson(dynamic jsonObject) {
  var se = credentialToMap(jsonObject);
  if (se.containsKey('id')) {
    id = se['id'];
  } else {
    throw FormatException('id property is needed in serviceEndpoint');
  }
  if (se.containsKey('type')) {
    type = se['type'];
  } else {
    throw FormatException('format property is needed in serviceEndpoint');
  }
  if (se.containsKey('serviceEndpoint')) {
    serviceEndpoint = se['serviceEndpoint'];
  } else {
    throw FormatException(
        'serviceEndpoint property is needed in serviceEndpoint');
  }
}