fromJSONArray static method

List<Link> fromJSONArray(
  1. List? json, {
  2. LinkHrefNormalizer normalizeHref = linkHrefNormalizerIdentity,
})

Creates a list of Link from its RWPM JSON representation. It's href and its children's recursively will be normalized using the provided normalizeHref closure. If a link can't be parsed, a warning will be logged with warnings.

Implementation

static List<Link> fromJSONArray(List<dynamic>? json,
        {LinkHrefNormalizer normalizeHref = linkHrefNormalizerIdentity}) =>
    (json ?? []).parseObjects((it) => Link.fromJSON(
        it as Map<String, dynamic>?,
        normalizeHref: normalizeHref));