public class JsonPathJacksonProvider extends Object implements com.jayway.jsonpath.spi.MappingProvider, com.jayway.jsonpath.spi.JsonProvider
| Modifier and Type | Field and Description |
|---|---|
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
| Constructor and Description |
|---|
JsonPathJacksonProvider() |
JsonPathJacksonProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone(Object obj) |
<T> T |
convertValue(Object fromValue,
Class<T> toValueType) |
<T extends Collection<E>,E> |
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.
|
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) |
public JsonPathJacksonProvider()
public JsonPathJacksonProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public com.jayway.jsonpath.spi.Mode getMode()
getMode in interface com.jayway.jsonpath.spi.JsonProviderpublic Object parse(String json) throws com.jayway.jsonpath.InvalidJsonException
parse in interface com.jayway.jsonpath.spi.JsonProvidercom.jayway.jsonpath.InvalidJsonExceptionpublic Object parse(Reader jsonReader) throws com.jayway.jsonpath.InvalidJsonException
parse in interface com.jayway.jsonpath.spi.JsonProvidercom.jayway.jsonpath.InvalidJsonExceptionpublic 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.JsonProviderpublic <T> T convertValue(Object fromValue, Class<T> toValueType) throws IllegalArgumentException
convertValue in interface com.jayway.jsonpath.spi.MappingProviderIllegalArgumentExceptionpublic <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 checkpublic boolean isArray(Object obj)
isArray in interface com.jayway.jsonpath.spi.JsonProviderobj - object to checkpublic 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 indexpublic 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 checkpublic Collection<String> getPropertyKeys(Object obj)
getPropertyKeys in interface com.jayway.jsonpath.spi.JsonProviderobj - an array or an objectpublic int length(Object obj)
length in interface com.jayway.jsonpath.spi.JsonProviderobj - an array or an objectCopyright © 2016 camunda services GmbH. All rights reserved.