Uses of Interface
jdk.incubator.json.JsonValue
Packages that use JsonValue
Package
Description
This API supports processing of JSON text in a simple manner.
-
Uses of JsonValue in jdk.incubator.json
Subinterfaces of JsonValue in jdk.incubator.jsonModifier and TypeInterfaceDescriptioninterfaceThe interface that represents JSON array.interfaceThe interface that represents the JSON boolean literals, "true" and "false".interfaceThe interface that represents JSON null.interfaceThe interface that represents JSON number, an arbitrary-precision number represented in base 10 using decimal digits.interfaceThe interface that represents JSON object.interfaceThe interface that represents JSON string.Methods in jdk.incubator.json that return JsonValueModifier and TypeMethodDescriptiondefault JsonValueJsonArray.get(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.default JsonValueJsonValue.get(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.static JsonValueJson.parse(char[] in) Parses and creates aJsonValuefrom the given JSON text.static JsonValueParses and creates aJsonValuefrom the given JSON text.Methods in jdk.incubator.json that return types with arguments of type JsonValueModifier and TypeMethodDescriptionJsonArray.asList()Returns an unmodifiable list of theJsonValues if thisJsonValueis an instance ofJsonArray; otherwise, throws aJsonValueException.JsonValue.asList()Returns an unmodifiable list of theJsonValues if thisJsonValueis an instance ofJsonArray; otherwise, throws aJsonValueException.JsonObject.asMap()Returns an unmodifiable map ofStringtoJsonValueif thisJsonValueis an instance ofJsonObject; otherwise, throws aJsonValueException.JsonValue.asMap()Returns an unmodifiable map ofStringtoJsonValueif thisJsonValueis an instance ofJsonObject; otherwise, throws aJsonValueException.Returns anOptionalcontaining the value of a given member of thisJsonObject, or an emptyOptionalif the member is absent; throwsJsonValueExceptionif thisJsonValueis not aJsonObject.Returns anOptionalcontaining the value of a given member of thisJsonObject, or an emptyOptionalif the member is absent; throwsJsonValueExceptionif thisJsonValueis not aJsonObject.JsonValue.tryValue()Returns anOptionalcontaining thisJsonValueif it is not an instance ofJsonNull, otherwise an emptyOptional.Methods in jdk.incubator.json with parameters of type JsonValueModifier and TypeMethodDescriptionstatic StringJson.toDisplayString(JsonValue value, String indent) Returns the String representation of the givenJsonValuethat conforms to the JSON syntax.Method parameters in jdk.incubator.json with type arguments of type JsonValueModifier and TypeMethodDescriptionstatic JsonArrayReturns theJsonArraywhose contents are copied from the given list ofJsonValues.static JsonObjectReturns theJsonObjectcreated from the given map ofStringtoJsonValues.