Package kong.unirest.core.json
Class JSONElement
java.lang.Object
kong.unirest.core.json.JSONElement
- Direct Known Subclasses:
JSONArray,JSONObject
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final kong.unirest.core.json.ToObjectMapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionoptQuery(JSONPointer query) query the object graph using JSONPointer https://tools.ietf.org/html/rfc6901query(JSONPointer query) query the object graph using JSONPointer https://tools.ietf.org/html/rfc6901toMap(JsonEngine.Element obj) protected static StringWrite the JSON to a WriterWrite the JSON to a Writer with a pretty format due to limitations in GSON the index and indent are currently ignored
-
Field Details
-
MAPPER
protected static final transient kong.unirest.core.json.ToObjectMapper MAPPER
-
-
Constructor Details
-
JSONElement
-
-
Method Details
-
write
Write the JSON to a Writer- Parameters:
sw- the writer- Returns:
- the same Writer
- Throws:
JSONException- for IO problems
-
write
Write the JSON to a Writer with a pretty format due to limitations in GSON the index and indent are currently ignored- Parameters:
sw- the writerindentFactor- currently ignoredindent- currently ignored- Returns:
- the same Writer
- Throws:
JSONException- for IO problems
-
query
query the object graph using JSONPointer https://tools.ietf.org/html/rfc6901- Parameters:
query- the pointer to get- Returns:
- the thing you asked for
-
query
query the object graph using JSONPointer https://tools.ietf.org/html/rfc6901- Parameters:
query- the pointer to get- Returns:
- the thing you asked for
-
optQuery
-
optQuery
-
getElement
-
toPrettyJson
-
toMap
-