Interface JsonNull
- All Superinterfaces:
JsonValue
The interface that represents JSON null.
A JsonNull can be created by parsing JSON text using either
Json.parse(String) or Json.parse(char[]).
Alternatively, of() can be used to obtain a JsonNull.
- Since:
- 28
-
Method Summary
Methods declared in interface JsonValue
asBoolean, asDouble, asInt, asList, asLong, asMap, asString, get, get, toString, tryGet, tryValueModifier and TypeMethodDescriptiondefault booleanReturns thebooleanvalue represented by thisJsonValueif it is an instance ofJsonBoolean; otherwise, throws aJsonValueException.default doubleasDouble()Returns adoubleif thisJsonValueis an instance ofJsonNumberthat can be converted, as if byDouble.parseDouble, to a finitedoublevalue; otherwise, throws aJsonValueException.default intasInt()Returns anintif thisJsonValueis an instance ofJsonNumberthat can be converted exactly; otherwise, throws aJsonValueException.asList()Returns an unmodifiable list of theJsonValues if thisJsonValueis an instance ofJsonArray; otherwise, throws aJsonValueException.default longasLong()Returns alongif thisJsonValueis an instance ofJsonNumberthat can be converted exactly; otherwise, throws aJsonValueException.asMap()Returns an unmodifiable map ofStringtoJsonValueif thisJsonValueis an instance ofJsonObject; otherwise, throws aJsonValueException.default StringasString()Returns theStringvalue represented by thisJsonValueif it is an instance ofJsonString; otherwise, throws aJsonValueException.default JsonValueget(int index) Returns theJsonValueassociated with the given index if thisJsonValueis an instance ofJsonArray; otherwise, throws aJsonValueException.default JsonValueReturns theJsonValueassociated with the given member name if thisJsonValueis an instance ofJsonObject; otherwise, throws aJsonValueException.toString()Returns a String representation of thisJsonValuethat conforms to JSON syntax.Returns anOptionalcontaining the value of a given member of thisJsonObject, or an emptyOptionalif the member is absent; throwsJsonValueExceptionif thisJsonValueis not aJsonObject.tryValue()Returns anOptionalcontaining thisJsonValueif it is not an instance ofJsonNull, otherwise an emptyOptional.
-
Method Details
-
of
-