Class JsonString
java.lang.Object
io.helidon.json.JsonValue
io.helidon.json.JsonString
Represents a JSON string value.
-
Method Summary
Modifier and TypeMethodDescriptionstatic JsonStringcreate(byte[] value) Create a JsonString from an array of UTF-8 encoded bytes.static JsonStringcreate(byte[] buffer, int start, int length) Create a JsonString from a range within a UTF-8 encoded byte buffer.static JsonStringCreate a JsonString from a String value.booleaninthashCode()voidtoJson(JsonGenerator generator) Write this JSON value to the provided generator.type()Return the type of this JSON value.value()Return the string value of this JsonString.Methods inherited from class JsonValue
asArray, asBoolean, asNumber, asObject, asString, objectBuilder, toStringModifier and TypeMethodDescriptionasArray()Cast this value to a JsonArray if it is of array type.Cast this value to a JsonBoolean if it is of boolean type.asNumber()Cast this value to a JsonNumber if it is of number type.asObject()Cast this value to a JsonObject if it is of object type.asString()Cast this value to a JsonString if it is of string type.static JsonObject.BuilderA new fluent API builder to construct anJsonObject.toString()
-
Method Details
-
create
Create a JsonString from a String value.- Parameters:
value- the string value- Returns:
- a new JsonString
-
create
Create a JsonString from an array of UTF-8 encoded bytes.- Parameters:
value- the UTF-8 encoded string bytes- Returns:
- a new JsonString
-
create
Create a JsonString from a range within a UTF-8 encoded byte buffer.- Parameters:
buffer- the buffer containing the UTF-8 encoded stringstart- the starting offset within the bufferlength- the number of bytes that belong to the string value- Returns:
- a new JsonString
-
value
-
equals
-
hashCode
-
type
Description copied from class:JsonValueReturn the type of this JSON value. -
toJson
Description copied from class:JsonValueWrite this JSON value to the provided generator.
-