| Modifier and Type | Field and Description |
|---|---|
| public static final NullSerializer |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
Overrides tools. Implements tools. Default implementation specifies no format. |
| public void | serialize(Object value, JsonGenerator gen, SerializationContext provider)
Implements abstract tools. Method that can be called to ask implementation to serialize values of type this serializer handles. |
| public void | serializeWithType(Object value, JsonGenerator gen, SerializationContext serializers, TypeSerializer typeSer)
Overrides tools. Although this method should rarely get called, for convenience we should override it, and handle it same way as "natural" types: by serializing exactly as is, without type decorations. |
| instance | back to summary |
|---|---|
| public static final NullSerializer instance | |
| NullSerializer | back to summary |
|---|---|
| private NullSerializer() | |
| acceptJsonFormatVisitor | back to summary |
|---|---|
| public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) Overrides tools. Implements tools. Doc from tools. Default implementation specifies no format. This behavior is usually overriden by custom serializers.
| |
| serialize | back to summary |
|---|---|
| public void serialize(Object value, JsonGenerator gen, SerializationContext provider) throws JacksonException Implements abstract tools. Doc from tools. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
| serializeWithType | back to summary |
|---|---|
| public void serializeWithType(Object value, JsonGenerator gen, SerializationContext serializers, TypeSerializer typeSer) throws JacksonException Overrides tools. Although this method should rarely get called, for convenience we should override it, and handle it same way as "natural" types: by serializing exactly as is, without type decorations. The most common possible use case is that of delegation by JSON filter; caller cannot know what kind of serializer it gets handed.
| |