Package no.hasmac.jsonld.lang
Class ListObject
java.lang.Object
no.hasmac.jsonld.lang.ListObject
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isListObject
(jakarta.json.JsonValue value) A list object is a map that has a @list key.static jakarta.json.JsonObject
toListObject
(jakarta.json.JsonValue value) Convert expanded value to a list object by first setting it to an array containing only expanded value if it is not already an array, and then by setting it to a map containing the key-value pair @list-expanded value.
-
Constructor Details
-
ListObject
private ListObject()
-
-
Method Details
-
isListObject
public static boolean isListObject(jakarta.json.JsonValue value) A list object is a map that has a @list key. It may also have an @index key, but no other entries. See the Lists and Sets section of JSON-LD 1.1 for a normative description.- Parameters:
value
- to check- Returns:
true
if the provided value is valid list object- See Also:
-
toListObject
public static jakarta.json.JsonObject toListObject(jakarta.json.JsonValue value) Convert expanded value to a list object by first setting it to an array containing only expanded value if it is not already an array, and then by setting it to a map containing the key-value pair @list-expanded value.- Parameters:
value
- to convert- Returns:
- list object containing the provided value
-