public interface JsonParser
ByteBuffer to implementations of the
JsonValue interface and vice versa. Underneath there could be different implementations that use different JSON
parser libraries or custom implementations. Respectively the JsonParser is responsible for building new instances of
the JsonArray and JsonObject interfaces, as they are ultimately tightly coupled with the specific JSON parser
that is being used.
A custom implementation of the JsonParser can be provided to the ClientOptions in case the
default implementation does not fit the requirements.| Modifier and Type | Method and Description |
|---|---|
JsonArray |
createJsonArray()
Create a new empty
JsonArray. |
JsonObject |
createJsonObject()
Create a new empty
JsonObject. |
JsonValue |
createJsonValue(ByteBuffer bytes)
Create a new
JsonValue from the provided ByteBuffer. |
JsonValue |
createJsonValue(String value)
Create a new
JsonValue from the provided value. |
JsonValue |
fromObject(Object object)
Create a new
JsonValue from the provided object. |
JsonValue |
loadJsonValue(ByteBuffer bytes)
Loads the provided
ByteBuffer in a new JsonValue. |
JsonValue loadJsonValue(ByteBuffer bytes)
ByteBuffer in a new JsonValue. Does not start the actual processing of the
ByteBuffer until a method of the JsonValue is called.bytes - the ByteBuffer to create the JsonValue fromJsonValueRedisJsonException - if the provided ByteBuffer is not a valid JSON documentJsonValue createJsonValue(ByteBuffer bytes)
JsonValue from the provided ByteBuffer.bytes - the ByteBuffer to create the JsonValue fromJsonValueRedisJsonException - if the provided ByteBuffer is not a valid JSON documentJsonValue createJsonValue(String value)
JsonValue from the provided value.value - the value to create the JsonValue fromJsonValueRedisJsonException - if the provided value is not a valid JSON documentJsonObject createJsonObject()
JsonObject.JsonObjectJsonArray createJsonArray()
JsonArray.JsonArrayCopyright © 2025 lettuce.io. All rights reserved.