Interface Jackson3ObjectReader
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Defines the contract for Object Mapping readers. Implementations of this interface can deserialize a given byte array
holding JSON to an Object considering the target type.
Reader functions can customize how the actual JSON is being deserialized by e.g. obtaining a customized
ObjectReader
applying serialization features, date formats, or views.
- Since:
- 4.0
- Author:
- Christoph Strobl, Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionstatic Jackson3ObjectReader
create()
Create a defaultJackson3ObjectReader
delegating toObjectMapper.readValue(byte[], int, int, JavaType)
.read
(tools.jackson.databind.ObjectMapper mapper, byte[] source, tools.jackson.databind.JavaType type) Read an object graph from the given root JSON into a Java object considering theJavaType
.
-
Method Details
-
read
Object read(tools.jackson.databind.ObjectMapper mapper, byte[] source, tools.jackson.databind.JavaType type) Read an object graph from the given root JSON into a Java object considering theJavaType
.- Parameters:
mapper
- the object mapper to use.source
- the JSON to deserialize.type
- the Java target type- Returns:
- the deserialized Java object.
-
create
Create a defaultJackson3ObjectReader
delegating toObjectMapper.readValue(byte[], int, int, JavaType)
.- Returns:
- the default
Jackson3ObjectReader
.
-