public class JsonContent extends Object
Constructor and Description |
---|
JsonContent(com.github.cliftonlabs.json_simple.JsonArray array)
wraps an array
|
JsonContent(com.github.cliftonlabs.json_simple.JsonObject object)
wraps an object
|
Modifier and Type | Method and Description |
---|---|
Object |
get(int index)
Get a value from root array
|
Object |
get(String key)
Get a property from root object
|
boolean |
isArray()
Check if wrapped object is a JSONArray
|
boolean |
isNull()
Check if wrapped object is null
|
boolean |
isObject()
Check if wrapped object is a JSONObject
|
Iterator |
iterator()
Get an iterator.
|
Iterator<String> |
keys()
Iterate keys of root object.
|
Set<String> |
keySet()
Get set of root object keys.
|
int |
size()
Get size of root object or array.
|
String |
toString()
Convert JSON object or array into string
|
public JsonContent(com.github.cliftonlabs.json_simple.JsonObject object)
object
- JsonObject to wrappublic JsonContent(com.github.cliftonlabs.json_simple.JsonArray array)
array
- JsonArray to wrappublic Object get(int index)
index
- array indexpublic Object get(String key)
key
- map keypublic Iterator iterator()
public int size()
public String toString()
public boolean isNull()
public boolean isObject()
public boolean isArray()
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.