listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}