|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.spin.impl.json.jackson.query.JsonPathJacksonProvider
public class JsonPathJacksonProvider
A copy of com.jayway.jsonpath.spi.impl.JacksonProvider which allows a) to use com.fasterxml.jackson b) to pass in a custom ObjectMapper
| Field Summary | |
|---|---|
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper
|
| Constructor Summary | |
|---|---|
JsonPathJacksonProvider()
|
|
JsonPathJacksonProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
|
|
| Method Summary | ||
|---|---|---|
Object |
clone(Object obj)
|
|
|
convertValue(Object fromValue,
Class<T> toValueType)
|
|
|
convertValue(Object fromValue,
Class<T> collectionType,
Class<E> elementType)
|
|
List<Object> |
createArray()
|
|
Map<String,Object> |
createMap()
|
|
com.jayway.jsonpath.spi.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. no array) |
|
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)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
| Constructor Detail |
|---|
public JsonPathJacksonProvider()
public JsonPathJacksonProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
| Method Detail |
|---|
public com.jayway.jsonpath.spi.Mode getMode()
getMode in interface com.jayway.jsonpath.spi.JsonProvider
public Object parse(String json)
throws com.jayway.jsonpath.InvalidJsonException
parse in interface com.jayway.jsonpath.spi.JsonProvidercom.jayway.jsonpath.InvalidJsonException
public Object parse(Reader jsonReader)
throws com.jayway.jsonpath.InvalidJsonException
parse in interface com.jayway.jsonpath.spi.JsonProvidercom.jayway.jsonpath.InvalidJsonException
public Object parse(InputStream jsonStream)
throws com.jayway.jsonpath.InvalidJsonException
parse in interface com.jayway.jsonpath.spi.JsonProvidercom.jayway.jsonpath.InvalidJsonExceptionpublic String toJson(Object obj)
toJson in interface com.jayway.jsonpath.spi.JsonProviderpublic Map<String,Object> createMap()
createMap in interface com.jayway.jsonpath.spi.JsonProviderpublic List<Object> createArray()
createArray in interface com.jayway.jsonpath.spi.JsonProvider
public <T> T convertValue(Object fromValue,
Class<T> toValueType)
throws IllegalArgumentException
convertValue in interface com.jayway.jsonpath.spi.MappingProviderIllegalArgumentException
public <T extends Collection<E>,E> T convertValue(Object fromValue,
Class<T> collectionType,
Class<E> elementType)
throws IllegalArgumentException
convertValue in interface com.jayway.jsonpath.spi.MappingProviderIllegalArgumentExceptionpublic Object clone(Object obj)
clone in interface com.jayway.jsonpath.spi.JsonProviderpublic boolean isContainer(Object obj)
isContainer in interface com.jayway.jsonpath.spi.JsonProviderobj - object to check
public boolean isArray(Object obj)
isArray in interface com.jayway.jsonpath.spi.JsonProviderobj - object to check
public Object getProperty(Object obj,
Object key)
getProperty in interface com.jayway.jsonpath.spi.JsonProviderobj - an array or an objectkey - a String key or a numerical index
public void setProperty(Object obj,
Object key,
Object value)
setProperty in interface com.jayway.jsonpath.spi.JsonProviderobj - an array or an objectkey - a String key or a numerical indexvalue - the value to setpublic boolean isMap(Object obj)
isMap in interface com.jayway.jsonpath.spi.JsonProviderobj - object to check
public Collection<String> getPropertyKeys(Object obj)
getPropertyKeys in interface com.jayway.jsonpath.spi.JsonProviderobj - an array or an object
public int length(Object obj)
length in interface com.jayway.jsonpath.spi.JsonProviderobj - an array or an object
public Iterable<Object> toIterable(Object obj)
Iterable
toIterable in interface com.jayway.jsonpath.spi.JsonProviderobj - an array or an object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||