mapFromJson static method

Map<String, PersonLinksSelfIriTemplate> mapFromJson(
  1. Map<String, dynamic>? json
)

Implementation

static Map<String, PersonLinksSelfIriTemplate> mapFromJson(
    Map<String, dynamic>? json) {
  if (json == null) {
    return <String, PersonLinksSelfIriTemplate>{};
  }

  return json.entries.fold(<String, PersonLinksSelfIriTemplate>{},
      (Map<String, PersonLinksSelfIriTemplate> previousValue, element) {
    final PersonLinksSelfIriTemplate? object =
        PersonLinksSelfIriTemplate.fromJson(element.value);
    if (object is PersonLinksSelfIriTemplate) {
      previousValue[element.key] = object;
    }

    return previousValue;
  });
}