public interface JsonValue
| Modifier and Type | Method and Description |
|---|---|
JsonArray |
asArray()
Cast this value instance to JsonArray
|
JsonBoolLiteral |
asBoolLiteral()
Cast this value instance to JsonBoolLiteral
|
JsonExpLiteral |
asExpLiteral()
Cast this value instance to JsonExpLiteralImpl
|
JsonFracLiteral |
asFracLiteral()
Cast this value instance to JsonFracLiteral
|
JsonIntLiteral |
asIntLiteral()
Cast this value instance to JsonIntLiteral
|
JsonLiteral |
asLiteral()
Cast this value instance to JsonLiteral
|
JsonNullLiteral |
asNullLiteral()
Cast this value instance to JsonNullLiteral
|
JsonObject |
asObject()
Cast this value instance to JsonObject
|
JsonStringLiteral |
asStringLiteral()
Cast this value instance to JsonStringLiteral
|
List<JsonValue> |
findAll(PathMatcher matcher)
Find all json values with defined path
|
List<String> |
findAllLiterals(PathMatcher matcher)
Find all json value with defined path and converts them to string value
|
JsonValue |
findFirst(PathMatcher matcher)
Find first json value with defined path
|
String |
findFirstLiteral(PathMatcher matcher)
Find first json value with defined path and converts it to string value
|
boolean |
isArray()
Checks if this value is instance of JsonArray
|
boolean |
isBoolLiteral()
Checks if this value is instance of JsonBoolLiteral
|
boolean |
isExpLiteral()
Checks if this value is instance of JsonExpLiteral
|
boolean |
isFracLiteral()
Checks if this value is instance of JsonFracLiteral
|
boolean |
isIntLiteral()
Checks if this value is instance of JsonIntLiteral
|
boolean |
isLiteral()
Checks if this value is instance of JsonLiteral
|
boolean |
isNullLiteral()
Checks if this value is instance of JsonNullLiteral
|
boolean |
isObject()
Checks if this value is instance of JsonObject
|
boolean |
isStringLiteral()
Checks if this value is instance of JsonStringLiteral
|
JsonValue |
parent()
Parent of this value in json structure
|
int |
parentIndex()
Index of this instance in parent object
|
String[] |
path()
Returns path of this value in json structure
|
void |
remove()
Removes this instance from parent object.
|
String |
toCompactString()
Produces compact string representation of this json value.
|
String |
toPrettyString(String indent)
Produces pretty (readable) string representation of this json value.
|
String toCompactString()
String toPrettyString(String indent)
indent - string used for indend nested levels. (ussually tab or some spaces)JsonObject asObject()
JsonArray asArray()
JsonNullLiteral asNullLiteral()
JsonBoolLiteral asBoolLiteral()
JsonExpLiteral asExpLiteral()
JsonFracLiteral asFracLiteral()
JsonIntLiteral asIntLiteral()
JsonStringLiteral asStringLiteral()
JsonLiteral asLiteral()
boolean isObject()
boolean isArray()
boolean isNullLiteral()
boolean isBoolLiteral()
boolean isExpLiteral()
boolean isFracLiteral()
boolean isIntLiteral()
boolean isStringLiteral()
boolean isLiteral()
List<JsonValue> findAll(PathMatcher matcher)
matcher - Matcher to used for identifying returned values.JsonValue findFirst(PathMatcher matcher)
matcher - Matcher to used for identifying returned value.List<String> findAllLiterals(PathMatcher matcher)
matcher - Matcher to used for identifying returned values.String findFirstLiteral(PathMatcher matcher)
matcher - Matcher to used for identifying returned value.JsonValue parent()
int parentIndex()
String[] path()
void remove()
Copyright © 2018. All rights reserved.