public abstract class AbstractJsonProvider extends Object implements JsonProvider
| Constructor and Description |
|---|
AbstractJsonProvider() |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone(Object obj) |
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
|
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateArray, createMap, getMode, parse, parse, parse, toJsonpublic Object clone(Object obj)
clone in interface JsonProviderpublic boolean isContainer(Object obj)
isContainer in interface JsonProviderobj - object to checkpublic boolean isArray(Object obj)
isArray in interface JsonProviderobj - object to checkpublic Object getProperty(Object obj, Object key)
getProperty in interface JsonProviderobj - an array or an objectkey - a String key or a numerical indexpublic void setProperty(Object obj, Object key, Object value)
setProperty in interface JsonProviderobj - an array or an objectkey - a String key or a numerical indexvalue - the value to setpublic boolean isMap(Object obj)
isMap in interface JsonProviderobj - object to checkpublic Collection<String> getPropertyKeys(Object obj)
getPropertyKeys in interface JsonProviderobj - an array or an objectpublic int length(Object obj)
length in interface JsonProviderobj - an array or an objectpublic Iterable<Object> toIterable(Object obj)
IterabletoIterable in interface JsonProviderobj - an array or an objectCopyright © 2011–2013. All rights reserved.