-
- All Implemented Interfaces:
public class Link.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static Link.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final LinkfromJSON(JSONObject json, Function1<String, String> normalizeHref, WarningLogger warnings)Creates an Link from its RWPM JSON representation. final List<Link>fromJSONArray(JSONArray json, Function1<String, String> normalizeHref, WarningLogger warnings)Creates a list of Link from its RWPM JSON representation. -
-
Method Detail
-
fromJSON
final Link fromJSON(JSONObject json, Function1<String, String> normalizeHref, WarningLogger warnings)
Creates an Link from its RWPM JSON representation. It's href and its children's recursively will be normalized using the provided normalizeHref closure. If the link can't be parsed, a warning will be logged with warnings.
-
fromJSONArray
final List<Link> fromJSONArray(JSONArray json, Function1<String, String> normalizeHref, WarningLogger warnings)
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.
-
-
-
-