Package | Description |
---|---|
org.codehaus.jackson |
Main public API classes of the core streaming JSON
processor: most importantly
JsonFactory
used for constructing
JSON parser (JsonParser )
and generator
(JsonParser )
instances. |
org.codehaus.jackson.map |
Contains basic mapper (conversion) functionality that
allows for converting between regular streaming json content and
Java objects (beans or Tree Model: support for both is via
ObjectMapper class, as well
as convenience methods included in
JsonParser
Object mapper will convert Json content to ant from
basic Java wrapper types (Integer, Boolean, Double),
Collection types (List, Map), Java Beans,
Strings and nulls. |
org.codehaus.jackson.map.type |
Package that contains concrete implementations of
JavaType , as
well as the factory (TypeFactory ) for
constructing instances from various input data types
(like Class , Type )
and programmatically (for structured types, arrays,
List s and Map s). |
org.codehaus.jackson.type |
Contains classes needed for type introspection, mostly used by data binding
functionality.
|
Modifier and Type | Method and Description |
---|---|
abstract <T> T |
ObjectCodec.readValue(JsonParser jp,
TypeReference<?> valueTypeRef)
Method to deserialize JSON content into a Java type, reference
to which is passed as argument.
|
<T> T |
JsonParser.readValueAs(TypeReference<?> valueTypeRef)
Method to deserialize JSON content into a Java type, reference
to which is passed as argument.
|
abstract <T> java.util.Iterator<T> |
ObjectCodec.readValues(JsonParser jp,
TypeReference<?> valueTypeRef)
Method for reading sequence of Objects from parser stream,
all with same specified value type.
|
<T> java.util.Iterator<T> |
JsonParser.readValuesAs(TypeReference<?> valueTypeRef)
Method for reading sequence of Objects from parser stream,
all with same specified value type.
|
Modifier and Type | Method and Description |
---|---|
JavaType |
MapperConfig.constructType(TypeReference<?> valueTypeRef)
Helper method that will construct
JavaType for given
type reference
This is a simple short-cut for:
getTypeFactory().constructType(valueTypeRef);
|
<T> T |
ObjectMapper.convertValue(java.lang.Object fromValue,
TypeReference toValueTypeRef) |
ObjectReader |
ObjectMapper.reader(TypeReference<?> type)
Factory method for constructing
ObjectReader that will
read or update instances of specified type |
<T> T |
ObjectMapper.readValue(byte[] src,
int offset,
int len,
TypeReference valueTypeRef) |
<T> T |
ObjectMapper.readValue(byte[] src,
TypeReference valueTypeRef) |
<T> T |
ObjectMapper.readValue(java.io.File src,
TypeReference valueTypeRef) |
<T> T |
ObjectMapper.readValue(java.io.InputStream src,
TypeReference valueTypeRef) |
<T> T |
ObjectMapper.readValue(JsonNode root,
TypeReference valueTypeRef)
Convenience method for converting results from given JSON tree into given
value type.
|
<T> T |
ObjectMapper.readValue(JsonParser jp,
TypeReference<?> valueTypeRef)
Method to deserialize JSON content into a Java type, reference
to which is passed as argument.
|
<T> T |
ObjectReader.readValue(JsonParser jp,
TypeReference<?> valueTypeRef) |
<T> T |
ObjectMapper.readValue(JsonParser jp,
TypeReference<?> valueTypeRef,
DeserializationConfig cfg)
Method to deserialize JSON content into a Java type, reference
to which is passed as argument.
|
<T> T |
ObjectMapper.readValue(java.io.Reader src,
TypeReference valueTypeRef) |
<T> T |
ObjectMapper.readValue(java.lang.String content,
TypeReference valueTypeRef) |
<T> T |
ObjectMapper.readValue(java.net.URL src,
TypeReference valueTypeRef) |
<T> MappingIterator<T> |
ObjectMapper.readValues(JsonParser jp,
TypeReference<?> valueTypeRef)
Method for reading sequence of Objects from parser stream.
|
<T> java.util.Iterator<T> |
ObjectReader.readValues(JsonParser jp,
TypeReference<?> valueTypeRef) |
ObjectWriter |
ObjectMapper.typedWriter(TypeReference<?> rootType)
Deprecated.
Since 1.9, use
ObjectMapper.writerWithType(TypeReference) instead. |
ObjectWriter |
ObjectWriter.withType(TypeReference<?> rootType) |
ObjectReader |
ObjectReader.withType(TypeReference<?> valueTypeRef) |
ObjectWriter |
ObjectMapper.writerWithType(TypeReference<?> rootType)
Factory method for constructing
ObjectWriter that will
serialize objects using specified root type, instead of actual
runtime type of value. |
Modifier and Type | Method and Description |
---|---|
JavaType |
TypeFactory.constructType(TypeReference<?> typeRef) |
static JavaType |
TypeFactory.fromTypeReference(TypeReference<?> ref)
Deprecated.
Use
TypeFactory.type(Type) instead |
static JavaType |
TypeFactory.type(TypeReference<?> ref)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
int |
TypeReference.compareTo(TypeReference<T> o)
The only reason we define this method (and require implementation
of
Comparable ) is to prevent constructing a
reference without type information. |