程序包 | 说明 |
---|---|
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.ser |
Contains implementation classes of serialization part of
data binding.
|
限定符和类型 | 字段和说明 |
---|---|
protected SerializerFactory |
ObjectWriter._serializerFactory |
protected SerializerFactory |
ObjectMapper._serializerFactory
Serializer factory used for constructing serializers.
|
限定符和类型 | 方法和说明 |
---|---|
SerializerFactory |
SerializerFactory.withAdditionalKeySerializers(Serializers additional) |
SerializerFactory |
SerializerFactory.withAdditionalSerializers(Serializers additional)
Convenience method for creating a new factory instance with additional serializer
provider; equivalent to calling
withConfig(getConfig().withAdditionalSerializers(additional));
|
abstract SerializerFactory |
SerializerFactory.withConfig(SerializerFactory.Config config)
Method used for creating a new instance of this factory, but with different
configuration.
|
SerializerFactory |
SerializerFactory.withSerializerModifier(BeanSerializerModifier modifier)
Convenience method for creating a new factory instance with additional bean
serializer modifier; equivalent to calling
withConfig(getConfig().withSerializerModifier(modifier));
|
限定符和类型 | 方法和说明 |
---|---|
abstract JsonSchema |
SerializerProvider.generateJsonSchema(Class<?> type,
SerializationConfig config,
SerializerFactory jsf)
Generate Json-schema for
given type.
|
abstract boolean |
SerializerProvider.hasSerializerFor(SerializationConfig cfg,
Class<?> cls,
SerializerFactory jsf)
Method that can be called to see if this serializer provider
can find a serializer for an instance of given class.
|
abstract void |
SerializerProvider.serializeValue(SerializationConfig cfg,
JsonGenerator jgen,
Object value,
JavaType rootType,
SerializerFactory jsf)
The method to be called by
ObjectMapper to
execute recursive serialization, using serializers that
this provider has access to; and using specified root type
for locating first-level serializer. |
abstract void |
SerializerProvider.serializeValue(SerializationConfig cfg,
JsonGenerator jgen,
Object value,
SerializerFactory jsf)
The method to be called by
ObjectMapper to
execute recursive serialization, using serializers that
this provider has access to. |
ObjectMapper |
ObjectMapper.setSerializerFactory(SerializerFactory f)
Method for setting specific
SerializerFactory to use
for constructing (bean) serializers. |
构造器和说明 |
---|
ObjectMapper(SerializerFactory sf)
已过时。
Use other constructors instead; note that
you can just set serializer factory with
ObjectMapper.setSerializerFactory(org.codehaus.jackson.map.SerializerFactory) |
限定符和类型 | 类和说明 |
---|---|
class |
BasicSerializerFactory
Factory class that can provide serializers for standard JDK classes,
as well as custom classes that extend standard classes or implement
one of "well-known" interfaces (such as
Collection ). |
class |
BeanSerializerFactory
Factory class that can provide serializers for any regular Java beans
(as defined by "having at least one get method recognizable as bean
accessor" -- where
Object.getClass() does not count);
as well as for "standard" JDK types. |
class |
CustomSerializerFactory
Serializer factory implementation that allows for configuring
mapping between types (classes) and serializers to use, by using
multiple types of overrides.
|
限定符和类型 | 字段和说明 |
---|---|
protected SerializerFactory |
StdSerializerProvider._serializerFactory |
限定符和类型 | 方法和说明 |
---|---|
SerializerFactory |
CustomSerializerFactory.withConfig(SerializerFactory.Config config) |
SerializerFactory |
BeanSerializerFactory.withConfig(SerializerFactory.Config config)
Method used by module registration functionality, to attach additional
serializer providers into this serializer factory.
|
限定符和类型 | 方法和说明 |
---|---|
protected StdSerializerProvider |
StdSerializerProvider.createInstance(SerializationConfig config,
SerializerFactory jsf)
Overridable method, used to create a non-blueprint instances from the blueprint.
|
JsonSchema |
StdSerializerProvider.generateJsonSchema(Class<?> type,
SerializationConfig config,
SerializerFactory jsf) |
boolean |
StdSerializerProvider.hasSerializerFor(SerializationConfig config,
Class<?> cls,
SerializerFactory jsf) |
void |
StdSerializerProvider.serializeValue(SerializationConfig config,
JsonGenerator jgen,
Object value,
JavaType rootType,
SerializerFactory jsf) |
void |
StdSerializerProvider.serializeValue(SerializationConfig config,
JsonGenerator jgen,
Object value,
SerializerFactory jsf) |
构造器和说明 |
---|
StdSerializerProvider(SerializationConfig config,
StdSerializerProvider src,
SerializerFactory f)
"Copy-constructor", used from
StdSerializerProvider.createInstance(org.codehaus.jackson.map.SerializationConfig, org.codehaus.jackson.map.SerializerFactory) (or by
sub-classes) |