Jackson Glossary: JsonSerializer
Package: org.codehaus.jackson.map
Jar: jackson-mapper
Role
This abstract class defines the simple interface that serialization infrastructure uses to serialize a single value of supported type. To serialize a POJO using BeanSerializer (which is a subtype), bean serializer has set of child JsonSerializer instances to use for serializing values of contained properties.
Usage
JsonSerializer instances are called by other serializers. Thus most of the time users need not call anything. However, when creating serializers for composite types (like POJOs with properties), it is necessary to both locate other serializers to call (using SerializerProvider that is passed via serialize()}} and {{{serializeWithType methods that are part of the interface), and then call appropriate serialization methods.
Default implementation(s)
BeanSerializer is the standard serializer used for POJOs
org.codehaus.jackson.map.ser.SerializerBase is the base class that can be used for custom serializer implementations.
org.codehaus.jackson.map.ser has a number of specific JsonSerializer types used for JDK types
org.codehaus.jackson.map.deser.
Back to Jackson Term Glossary
