public abstract class JSONElement extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static kong.unirest.json.ToObjectMapper |
MAPPER |
| Modifier | Constructor and Description |
|---|---|
protected |
JSONElement(com.google.gson.JsonElement e) |
| Modifier and Type | Method and Description |
|---|---|
Object |
optQuery(JSONPointer query) |
Object |
optQuery(String query) |
Object |
query(JSONPointer query)
query the object graph using JSONPointer
https://tools.ietf.org/html/rfc6901
|
Object |
query(String query)
query the object graph using JSONPointer
https://tools.ietf.org/html/rfc6901
|
Writer |
write(Writer sw)
Write the JSON to a Writer
|
Writer |
write(Writer sw,
int indentFactor,
int indent)
Write the JSON to a Writer with a pretty format
due to limitations in GSON the index and indent are currently ignored
|
public Writer write(Writer sw) throws JSONException
sw - the writerJSONException - for IO problemspublic Writer write(Writer sw, int indentFactor, int indent) throws JSONException
sw - the writerindentFactor - currently ignoredindent - currently ignoredJSONException - for IO problemspublic Object query(String query)
query - the pointer to getpublic Object query(JSONPointer query)
query - the pointer to getpublic Object optQuery(JSONPointer query)
Copyright © 2020. All rights reserved.