-
- All Implemented Interfaces:
public class Subject.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static Subject.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final SubjectfromJSON(Object json, Function1<String, String> normalizeHref, WarningLogger warnings)Parses a Subject from its RWPM JSON representation. final List<Subject>fromJSONArray(Object json, Function1<String, String> normalizeHref, WarningLogger warnings)Creates a list of Subject from its RWPM JSON representation. -
-
Method Detail
-
fromJSON
final Subject fromJSON(Object json, Function1<String, String> normalizeHref, WarningLogger warnings)
Parses a Subject from its RWPM JSON representation.
A subject can be parsed from a single string, or a full-fledged object. The links' href and their children's will be normalized recursively using the provided normalizeHref closure. If the subject can't be parsed, a warning will be logged with warnings.
-
fromJSONArray
final List<Subject> fromJSONArray(Object json, Function1<String, String> normalizeHref, WarningLogger warnings)
Creates a list of Subject from its RWPM JSON representation.
The links' href and their children's will be normalized recursively using the provided normalizeHref closure. If a subject can't be parsed, a warning will be logged with warnings.
-
-
-
-