public class DefaultJsonParser extends Object implements JsonParser
JsonParser that should fit most use cases. Utilizes the Jackson library for maintaining
the JSON tree model and provides the ability to create new instances of the JsonValue, JsonArray and
JsonObject.| Constructor and Description |
|---|
DefaultJsonParser() |
| 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. |
public JsonValue loadJsonValue(ByteBuffer bytes)
JsonParserByteBuffer in a new JsonValue. Does not start the actual processing of the
ByteBuffer until a method of the JsonValue is called.loadJsonValue in interface JsonParserbytes - the ByteBuffer to create the JsonValue fromJsonValuepublic JsonValue createJsonValue(ByteBuffer bytes)
JsonParserJsonValue from the provided ByteBuffer.createJsonValue in interface JsonParserbytes - the ByteBuffer to create the JsonValue fromJsonValuepublic JsonValue createJsonValue(String value)
JsonParserJsonValue from the provided value.createJsonValue in interface JsonParservalue - the value to create the JsonValue fromJsonValuepublic JsonObject createJsonObject()
JsonParserJsonObject.createJsonObject in interface JsonParserJsonObjectpublic JsonArray createJsonArray()
JsonParserJsonArray.createJsonArray in interface JsonParserJsonArraypublic JsonValue fromObject(Object object)
JsonParserJsonValue from the provided object.fromObject in interface JsonParserobject - the object to create the JsonValue fromJsonValueCopyright © 2025 lettuce.io. All rights reserved.