Package io.joynr.util
Class ObjectMapper
- java.lang.Object
-
- io.joynr.util.ObjectMapper
-
public class ObjectMapper extends Object
-
-
Constructor Summary
Constructors Constructor Description ObjectMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidconfigure(com.fasterxml.jackson.databind.DeserializationFeature f, boolean state)voidconfigure(com.fasterxml.jackson.databind.MapperFeature f, boolean state)voidconfigure(com.fasterxml.jackson.databind.SerializationFeature f, boolean state)<T> TconvertValue(Object fromValue, com.fasterxml.jackson.core.type.TypeReference<T> toValueTypeRef)<T> TconvertValue(Object fromValue, com.fasterxml.jackson.databind.JavaType toValueType)<T> TconvertValue(Object fromValue, Class<T> toValueType)voidenableDefaultTypingAsProperty(com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping applicability, String propertyName)Deprecated.com.fasterxml.jackson.databind.DeserializationConfiggetDeserializationConfig()com.fasterxml.jackson.databind.SerializationConfiggetSerializationConfig()com.fasterxml.jackson.databind.JsonNodereadTree(InputStream in)<T> TreadValue(byte[] src, Class<T> valueType)<T> TreadValue(com.fasterxml.jackson.core.JsonParser p, Class<T> valueType)<T> TreadValue(String content, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)<T> TreadValue(String content, Class<T> valueType)<T> TreadValue(URL src, Class<T> valueType)voidregisterModule(com.fasterxml.jackson.databind.Module module)voidregisterSubtypes(Class<?>... classes)<T> TtreeToValue(com.fasterxml.jackson.core.TreeNode n, Class<T> valueType)<T extends com.fasterxml.jackson.databind.JsonNode>
TvalueToTree(Object fromValue)StringwriteValueAsString(Object value)
-
-
-
Method Detail
-
readValue
public <T> T readValue(com.fasterxml.jackson.core.JsonParser p, Class<T> valueType) throws IOException- Throws:
IOException
-
readValue
public <T> T readValue(URL src, Class<T> valueType) throws IOException, com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException
- Throws:
IOExceptioncom.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingException
-
readValue
public <T> T readValue(String content, Class<T> valueType) throws com.fasterxml.jackson.core.JsonProcessingException, com.fasterxml.jackson.databind.JsonMappingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingExceptioncom.fasterxml.jackson.databind.JsonMappingException
-
readValue
public <T> T readValue(String content, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) throws com.fasterxml.jackson.core.JsonProcessingException, com.fasterxml.jackson.databind.JsonMappingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingExceptioncom.fasterxml.jackson.databind.JsonMappingException
-
treeToValue
public <T> T treeToValue(com.fasterxml.jackson.core.TreeNode n, Class<T> valueType) throws IllegalArgumentException, com.fasterxml.jackson.core.JsonProcessingException- Throws:
IllegalArgumentExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
valueToTree
public <T extends com.fasterxml.jackson.databind.JsonNode> T valueToTree(Object fromValue) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
writeValueAsString
public String writeValueAsString(Object value) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
convertValue
public <T> T convertValue(Object fromValue, Class<T> toValueType) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
convertValue
public <T> T convertValue(Object fromValue, com.fasterxml.jackson.core.type.TypeReference<T> toValueTypeRef) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
convertValue
public <T> T convertValue(Object fromValue, com.fasterxml.jackson.databind.JavaType toValueType) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
enableDefaultTypingAsProperty
@Deprecated public void enableDefaultTypingAsProperty(com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping applicability, String propertyName)
Deprecated.
-
configure
public void configure(com.fasterxml.jackson.databind.SerializationFeature f, boolean state)
-
configure
public void configure(com.fasterxml.jackson.databind.DeserializationFeature f, boolean state)
-
configure
public void configure(com.fasterxml.jackson.databind.MapperFeature f, boolean state)
-
getSerializationConfig
public com.fasterxml.jackson.databind.SerializationConfig getSerializationConfig()
-
getDeserializationConfig
public com.fasterxml.jackson.databind.DeserializationConfig getDeserializationConfig()
-
registerModule
public void registerModule(com.fasterxml.jackson.databind.Module module)
-
registerSubtypes
public void registerSubtypes(Class<?>... classes)
-
readValue
public <T> T readValue(byte[] src, Class<T> valueType) throws IOException, com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException- Throws:
IOExceptioncom.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingException
-
readTree
public com.fasterxml.jackson.databind.JsonNode readTree(InputStream in) throws IOException
- Throws:
IOException
-
-