public interface JsonProvider
Modifier and Type | Method and Description |
---|---|
Object |
clone(Object model) |
Iterable |
createArray() |
Object |
createMap() |
Mode |
getMode() |
Object |
getProperty(Object obj,
Object key)
Extracts a value from an object or array
|
Collection<String> |
getPropertyKeys(Object obj)
Returns the keys from the given object or the indexes from an array
|
boolean |
isArray(Object obj)
checks if object is an array
|
boolean |
isContainer(Object obj)
checks if object is a map or an array
|
boolean |
isMap(Object obj)
checks if object is a map (i.e.
|
int |
length(Object obj)
Get the length of an array or object
|
Object |
parse(InputStream jsonStream) |
Object |
parse(Reader jsonReader) |
Object |
parse(String json) |
void |
setProperty(Object obj,
Object key,
Object value)
Sets a value in an object or array
|
Iterable<Object> |
toIterable(Object obj)
Converts given object to an
Iterable |
String |
toJson(Object obj) |
Mode getMode()
Object parse(String json) throws InvalidJsonException
InvalidJsonException
Object parse(Reader jsonReader) throws InvalidJsonException
InvalidJsonException
Object parse(InputStream jsonStream) throws InvalidJsonException
InvalidJsonException
Object createMap()
Iterable createArray()
boolean isContainer(Object obj)
obj
- object to checkboolean isArray(Object obj)
obj
- object to checkint length(Object obj)
obj
- an array or an objectIterable<Object> toIterable(Object obj)
Iterable
obj
- an array or an objectCollection<String> getPropertyKeys(Object obj)
obj
- an array or an objectObject getProperty(Object obj, Object key)
obj
- an array or an objectkey
- a String key or a numerical indexvoid setProperty(Object obj, Object key, Object value)
obj
- an array or an objectkey
- a String key or a numerical indexvalue
- the value to setboolean isMap(Object obj)
obj
- object to checkCopyright © 2011–2014. All rights reserved.