listFromJson static method

Implementation

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

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

    return previousValue;
  });
}