Package org.keycloak.json
Class RawJsonValue
java.lang.Object
org.keycloak.json.RawJsonValue
- All Implemented Interfaces:
Serializable
A Jackson-version-agnostic replacement for
JsonNode.
Jackson 2 uses com.fasterxml.jackson.databind.JsonNode, Jackson 3 uses
tools.jackson.databind.JsonNode — different classes in different packages.
This type wraps an arbitrary JSON value and delegates all navigation to a
RawJsonValueSupport implementation backed by the real JsonNode
from whichever Jackson version is on the classpath.
Self-describing to any Jackson version via shared annotations
(JsonCreator and JsonValue from com.fasterxml.jackson.annotation).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanintasInt()longasLong()asText()booleangetValue()inthashCode()booleanisEmpty()static RawJsonValuetoString()static <T> Tunwrap(Class<T> type, RawJsonValue rawJsonValue) Converts the underlying value to the given type using theKeycloakJsonMapper.
-
Method Details
-
of
-
getValue
-
get
-
path
-
asBoolean
public boolean asBoolean() -
asInt
public int asInt() -
asLong
public long asLong() -
asText
-
asText
-
textValue
-
isEmpty
public boolean isEmpty() -
unwrap
Converts the underlying value to the given type using theKeycloakJsonMapper. Useful for server-side code that needs a Jackson-version-specific type (e.g.,JsonNode). -
equals
-
hashCode
public int hashCode() -
toString
-