Top Description Constructors Methods
com.fasterxml.jackson.databind.ser.std

public abstract Class NonTypedScalarSerializerBase<T>

extends StdScalarSerializer<T>
Class Inheritance
Annotations
@SuppressWarnings:serial
@Deprecated
Imports
java.io.IOException, com.fasterxml.jackson.core.*, com.fasterxml.jackson.databind.SerializerProvider, com.fasterxml.jackson.databind.jsontype.TypeSerializer

Deprecated

Intermediate base class for limited number of scalar types that should never include type information. These are "native" types that are default mappings for corresponding JSON scalar types: java.lang.String, java.lang.Integer, java.lang.Double and java.lang.Boolean.

Constructor Summary

AccessConstructor and Description
protected
protected
NonTypedScalarSerializerBase(Class<?> t, boolean bogus)

Method Summary

Modifier and TypeMethod and Description
public final void
serializeWithType(T
Value to serialize; can not be null.
value
,
JsonGenerator
Generator used to output resulting Json content
gen
,
SerializerProvider
Provider that can be used to get serializers for serializing Objects value contains, if any.
provider
,
TypeSerializer
Type serializer to use for including type information
typeSer
)

Overrides com.fasterxml.jackson.databind.ser.std.StdScalarSerializer.serializeWithType.

Default implementation will write type prefix, call regular serialization method (since assumption is that value itself does not need JSON Array or Object start/end markers), and then write type suffix.

Inherited from com.fasterxml.jackson.databind.ser.std.StdScalarSerializer:
acceptJsonFormatVisitorgetSchema

Constructor Detail

NonTypedScalarSerializerBaseback to summary
protected NonTypedScalarSerializerBase(Class<T> t)
NonTypedScalarSerializerBaseback to summary
protected NonTypedScalarSerializerBase(Class<?> t, boolean bogus)

Method Detail

serializeWithTypeback to summary
public final void serializeWithType(T value, JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) throws IOException

Overrides com.fasterxml.jackson.databind.ser.std.StdScalarSerializer.serializeWithType.

Doc from com.fasterxml.jackson.databind.ser.std.StdScalarSerializer.serializeWithType.

Default implementation will write type prefix, call regular serialization method (since assumption is that value itself does not need JSON Array or Object start/end markers), and then write type suffix. This should work for most cases; some sub-classes may want to change this behavior.

Parameters
value:T

Doc from com.fasterxml.jackson.databind.JsonSerializer.serializeWithType.

Value to serialize; can not be null.

gen:JsonGenerator

Doc from com.fasterxml.jackson.databind.JsonSerializer.serializeWithType.

Generator used to output resulting Json content

provider:SerializerProvider

Doc from com.fasterxml.jackson.databind.JsonSerializer.serializeWithType.

Provider that can be used to get serializers for serializing Objects value contains, if any.

typeSer:TypeSerializer

Doc from com.fasterxml.jackson.databind.JsonSerializer.serializeWithType.

Type serializer to use for including type information

Annotations
@Override