listFromJson static method

List<PersonLinksSelfIriTemplate> listFromJson(
  1. List? json
)

Implementation

static List<PersonLinksSelfIriTemplate> listFromJson(List<dynamic>? json) {
  if (json == null) {
    return <PersonLinksSelfIriTemplate>[];
  }

  return json.fold(<PersonLinksSelfIriTemplate>[],
      (List<PersonLinksSelfIriTemplate> previousValue, element) {
    final PersonLinksSelfIriTemplate? object =
        PersonLinksSelfIriTemplate.fromJson(element);
    if (object is PersonLinksSelfIriTemplate) {
      previousValue.add(object);
    }

    return previousValue;
  });
}