JsonFormatVisitable
, SchemaAware
, ContextualSerializer
, Serializable
NumberSerializers.DoubleSerializer
, NumberSerializers.FloatSerializer
, NumberSerializers.IntegerSerializer
, NumberSerializers.IntLikeSerializer
, NumberSerializers.LongSerializer
, NumberSerializers.ShortSerializer
protected abstract static class NumberSerializers.Base<T> extends StdScalarSerializer<T> implements ContextualSerializer
JsonSerializer.None
Modifier and Type | Field | Description |
---|---|---|
protected boolean |
_isInt |
|
protected com.fasterxml.jackson.core.JsonParser.NumberType |
_numberType |
|
protected String |
_schemaType |
_handledType
Modifier | Constructor | Description |
---|---|---|
protected |
Base(Class<?> cls,
com.fasterxml.jackson.core.JsonParser.NumberType numberType,
String schemaType) |
Modifier and Type | Method | Description |
---|---|---|
void |
acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor,
JavaType typeHint) |
Default implementation specifies no format.
|
JsonSerializer<?> |
createContextual(SerializerProvider prov,
BeanProperty property) |
Method called to see if a different (or differently configured) serializer
is needed to serialize values of specified property.
|
JsonNode |
getSchema(SerializerProvider provider,
Type typeHint) |
Default implementation simply claims type is "string"; usually
overriden by custom serializers.
|
getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
serializeWithType
_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, serialize, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
protected final com.fasterxml.jackson.core.JsonParser.NumberType _numberType
protected final String _schemaType
protected final boolean _isInt
public JsonNode getSchema(SerializerProvider provider, Type typeHint)
StdSerializer
getSchema
in interface SchemaAware
getSchema
in class StdScalarSerializer<T>
provider
- The serializer provider.typeHint
- A hint about the type.public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException
StdSerializer
acceptJsonFormatVisitor
in interface JsonFormatVisitable
acceptJsonFormatVisitor
in class StdScalarSerializer<T>
typeHint
- Type of element (entity like property) being visitedJsonMappingException
public JsonSerializer<?> createContextual(SerializerProvider prov, BeanProperty property) throws JsonMappingException
ContextualSerializer
createContextual
in interface ContextualSerializer
prov
- Serializer provider to use for accessing config, other serializersproperty
- Method or field that represents the property
(and is used to access value to serialize).
Should be available; but there may be cases where caller cannot provide it and
null is passed instead (in which case impls usually pass 'this' serializer as is)JsonMappingException
Copyright © 2008–2018. All rights reserved.