public interface JsonUnmarshaller
JsonPath and
JsonProperty annotations.| Modifier and Type | Method and Description |
|---|---|
<T> boolean |
isSuitableForUnmarshalling(Class<T> resultClass)
Checks to see if a class is valid for json unmarshalling.
|
void |
setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Set a custom ObjectMapper to use during unmarshalling.
|
<T> T |
unmarshal(Class<T> resultClass,
String json)
Unmarshals Json according to the
JsonPath and
JsonProperty annotations in the provided class. |
<T> T unmarshal(Class<T> resultClass, String json) throws IOException
JsonPath and
JsonProperty annotations in the provided class.T - the class type.resultClass - the class to instantiate and populate with result data.json - the json.IOException - if something goes wrong with unmarshalling.<T> boolean isSuitableForUnmarshalling(Class<T> resultClass)
T - the class type.resultClass - the class to inspect.void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
objectMapper - the object mapper.Copyright © 2015 Elastic Path Software, Inc. All rights reserved.