public class ObjectMapperImpl extends Object implements ObjectMapper
| Constructor and Description |
|---|
ObjectMapperImpl() |
ObjectMapperImpl(JsonParserFactory parserFactory,
JsonSerializerFactory serializerFactory) |
| Modifier and Type | Method and Description |
|---|---|
Object |
fromJson(byte[] bytes) |
<T> T |
fromJson(byte[] bytes,
Class<T> clazz) |
Object |
fromJson(char[] chars) |
<T> T |
fromJson(char[] chars,
Class<T> clazz) |
Object |
fromJson(InputStream reader) |
<T> T |
fromJson(InputStream inputStream,
Class<T> clazz) |
Object |
fromJson(Reader reader) |
<T> T |
fromJson(Reader reader,
Class<T> clazz) |
Object |
fromJson(String json) |
<T> T |
fromJson(String json,
Class<T> clazz) |
JsonParserAndMapper |
parser() |
<T extends Collection<C>,C> |
readValue(byte[] src,
Charset charset,
Class<T> valueType,
Class<C> componentType)
Method to deserialize JSON content into a container like Set or List.
|
<T> T |
readValue(byte[] src,
Class<T> valueType)
Method to deserialize JSON content into a non-container
type typically a bean or wrapper type.
|
<T extends Collection<C>,C> |
readValue(byte[] src,
Class<T> valueType,
Class<C> componentType)
Method to deserialize JSON content into a container like Set or List.
|
<T> T |
readValue(char[] src,
Class<T> valueType)
Method to deserialize JSON content into a non-container
type typically a bean or wrapper type.
|
<T extends Collection<C>,C> |
readValue(char[] src,
Class<T> valueType,
Class<C> componentType)
Method to deserialize JSON content into a container like Set or List.
|
<T> T |
readValue(File src,
Class<T> valueType)
Method to deserialize JSON content into a non-container
type typically a bean or wrapper type.
|
<T extends Collection<C>,C> |
readValue(File src,
Class<T> valueType,
Class<C> componentType)
Method to deserialize JSON content into a container like Set or List.
|
<T extends Collection<C>,C> |
readValue(InputStream src,
Charset charset,
Class<T> valueType,
Class<C> componentType)
Method to deserialize JSON content into a container like Set or List.
|
<T> T |
readValue(InputStream src,
Class<T> valueType)
Method to deserialize JSON content into a non-container
type typically a bean or wrapper type.
|
<T extends Collection<C>,C> |
readValue(InputStream src,
Class<T> valueType,
Class<C> componentType)
Method to deserialize JSON content into a container like Set or List.
|
<T> T |
readValue(Reader src,
Class<T> valueType)
Method to deserialize JSON content into a non-container
type typically a bean or wrapper type.
|
<T extends Collection<C>,C> |
readValue(Reader src,
Class<T> valueType,
Class<C> componentType)
Method to deserialize JSON content into a container like Set or List.
|
<T> T |
readValue(String src,
Class<T> valueType)
Method to deserialize JSON content into a non-container
type typically a bean or wrapper type.
|
<T extends Collection<C>,C> |
readValue(String src,
Class<T> valueType,
Class<C> componentType)
Method to deserialize JSON content into a container like Set or List.
|
JsonSerializer |
serializer() |
String |
toJson(Object value) |
void |
toJson(Object value,
Appendable appendable) |
void |
writeValue(File dest,
Object value)
Method that can be used to serialize any Java value as
JSON output, written to File provided.
|
void |
writeValue(OutputStream dest,
Object value)
Method that can be used to serialize any Java value as
JSON output, using output stream provided (using encoding
UTF8.
|
void |
writeValue(Writer dest,
Object value)
Method that can be used to serialize any Java value as
JSON output, using Writer provided.
|
byte[] |
writeValueAsBytes(Object value)
Method that can be used to serialize any Java value as
a byte array.
|
byte[] |
writeValueAsBytes(Object value,
Charset charset)
Method that can be used to serialize any Java value as
a byte array.
|
char[] |
writeValueAsCharArray(Object value)
Method that can be used to serialize any Java value as
a char[].
|
String |
writeValueAsString(Object value)
Method that can be used to serialize any Java value as
a String.
|
public ObjectMapperImpl(JsonParserFactory parserFactory, JsonSerializerFactory serializerFactory)
public ObjectMapperImpl()
public <T> T readValue(String src, Class<T> valueType)
ObjectMapper
Note: this method should NOT be used if the result type is a
container (Collection or Map.
The reason is that due to type erasure, key and value types
can not be introspected when using this method.
readValue in interface ObjectMapperpublic <T> T readValue(File src, Class<T> valueType)
ObjectMapper
Note: this method should NOT be used if the result type is a
container (Collection or Map.
The reason is that due to type erasure, key and value types
can not be introspected when using this method.
readValue in interface ObjectMapperpublic <T> T readValue(byte[] src,
Class<T> valueType)
ObjectMapper
Note: this method should NOT be used if the result type is a
container (Collection or Map.
The reason is that due to type erasure, key and value types
can not be introspected when using this method.
readValue in interface ObjectMapperpublic <T> T readValue(char[] src,
Class<T> valueType)
ObjectMapper
Note: this method should NOT be used if the result type is a
container (Collection or Map.
The reason is that due to type erasure, key and value types
can not be introspected when using this method.
readValue in interface ObjectMapperpublic <T> T readValue(Reader src, Class<T> valueType)
ObjectMapper
Note: this method should NOT be used if the result type is a
container (Collection or Map.
The reason is that due to type erasure, key and value types
can not be introspected when using this method.
readValue in interface ObjectMapperpublic <T> T readValue(InputStream src, Class<T> valueType)
ObjectMapper
Note: this method should NOT be used if the result type is a
container (Collection or Map.
The reason is that due to type erasure, key and value types
can not be introspected when using this method.
readValue in interface ObjectMapperpublic <T extends Collection<C>,C> T readValue(String src, Class<T> valueType, Class<C> componentType)
ObjectMapper
Note: this method should be used if the result type is a
container (Collection.
The reason is that due to type erasure, key and value types
can not be introspected without using this method.
readValue in interface ObjectMapperpublic <T extends Collection<C>,C> T readValue(File src, Class<T> valueType, Class<C> componentType)
ObjectMapper
Note: this method should be used if the result type is a
container (Collection.
The reason is that due to type erasure, key and value types
can not be introspected without using this method.
readValue in interface ObjectMapperpublic <T extends Collection<C>,C> T readValue(byte[] src, Class<T> valueType, Class<C> componentType)
ObjectMapper
Note: this method should be used if the result type is a
container (Collection.
The reason is that due to type erasure, key and value types
can not be introspected without using this method.
readValue in interface ObjectMapperpublic <T extends Collection<C>,C> T readValue(char[] src, Class<T> valueType, Class<C> componentType)
ObjectMapper
Note: this method should be used if the result type is a
container (Collection.
The reason is that due to type erasure, key and value types
can not be introspected without using this method.
readValue in interface ObjectMapperpublic <T extends Collection<C>,C> T readValue(Reader src, Class<T> valueType, Class<C> componentType)
ObjectMapper
Note: this method should be used if the result type is a
container (Collection.
The reason is that due to type erasure, key and value types
can not be introspected without using this method.
readValue in interface ObjectMapperpublic <T extends Collection<C>,C> T readValue(InputStream src, Class<T> valueType, Class<C> componentType)
ObjectMapper
Note: this method should be used if the result type is a
container (Collection.
The reason is that due to type erasure, key and value types
can not be introspected without using this method.
readValue in interface ObjectMapperpublic <T extends Collection<C>,C> T readValue(byte[] src, Charset charset, Class<T> valueType, Class<C> componentType)
ObjectMapper
Note: this method should be used if the result type is a
container (Collection.
The reason is that due to type erasure, key and value types
can not be introspected without using this method.
readValue in interface ObjectMapperpublic <T extends Collection<C>,C> T readValue(InputStream src, Charset charset, Class<T> valueType, Class<C> componentType)
ObjectMapper
Note: this method should be used if the result type is a
container (Collection.
The reason is that due to type erasure, key and value types
can not be introspected without using this method.
readValue in interface ObjectMapperpublic void writeValue(File dest, Object value)
ObjectMapperwriteValue in interface ObjectMapperpublic void writeValue(OutputStream dest, Object value)
ObjectMapperNote: method does not close the underlying stream explicitly here.
writeValue in interface ObjectMapperpublic void writeValue(Writer dest, Object value)
ObjectMapperNote: method does not close the underlying stream explicitly here.
writeValue in interface ObjectMapperpublic String writeValueAsString(Object value)
ObjectMapperObjectMapper.writeValue(Writer,Object) with StringWriter
and constructing String, but more efficient.
writeValueAsString in interface ObjectMapperpublic char[] writeValueAsCharArray(Object value)
ObjectMapperObjectMapper.writeValue(Writer,Object) with StringWriter
and constructing String, but more efficient.
writeValueAsCharArray in interface ObjectMapperpublic byte[] writeValueAsBytes(Object value)
ObjectMapperwriteValueAsBytes in interface ObjectMapperpublic byte[] writeValueAsBytes(Object value, Charset charset)
ObjectMapperwriteValueAsBytes in interface ObjectMapperpublic JsonParserAndMapper parser()
parser in interface ObjectMapperpublic JsonSerializer serializer()
serializer in interface ObjectMapperpublic String toJson(Object value)
toJson in interface ObjectMapperpublic void toJson(Object value, Appendable appendable)
toJson in interface ObjectMapperpublic <T> T fromJson(String json, Class<T> clazz)
fromJson in interface ObjectMapperpublic <T> T fromJson(byte[] bytes,
Class<T> clazz)
fromJson in interface ObjectMapperpublic <T> T fromJson(char[] chars,
Class<T> clazz)
fromJson in interface ObjectMapperpublic <T> T fromJson(Reader reader, Class<T> clazz)
fromJson in interface ObjectMapperpublic <T> T fromJson(InputStream inputStream, Class<T> clazz)
fromJson in interface ObjectMapperpublic Object fromJson(String json)
fromJson in interface ObjectMapperpublic Object fromJson(Reader reader)
fromJson in interface ObjectMapperpublic Object fromJson(byte[] bytes)
fromJson in interface ObjectMapperpublic Object fromJson(char[] chars)
fromJson in interface ObjectMapperpublic Object fromJson(InputStream reader)
fromJson in interface ObjectMapperCopyright © 2016. All Rights Reserved.