public static final class StdArraySerializers.DoubleArraySerializer extends ArraySerializerBase<double[]>
JsonSerializer.None_property_handledType| Constructor and Description |
|---|
StdArraySerializers.DoubleArraySerializer() |
| Modifier and Type | Method and Description |
|---|---|
ContainerSerializer<?> |
_withValueTypeSerializer(TypeSerializer vts)
Doubles never add type info; hence, even if type serializer is suggested,
we'll ignore it...
|
void |
acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor,
JavaType typeHint)
Default implementation specifies no format.
|
JsonSerializer<?> |
getContentSerializer()
Accessor for serializer used for serializing contents
(List and array elements, Map values etc) of the
container for which this serializer is used, if it is
known statically.
|
JavaType |
getContentType()
Accessor for finding declared (static) element type for
type this serializer is used for.
|
JsonNode |
getSchema(SerializerProvider provider,
Type typeHint)
Default implementation simply claims type is "string"; usually
overriden by custom serializers.
|
boolean |
hasSingleElement(double[] value)
Method called to determine if the given value (of type handled by
this serializer) contains exactly one element.
|
boolean |
isEmpty(double[] value)
Method called to check whether given serializable value is
considered "empty" value (for purposes of suppressing serialization
of empty values).
|
void |
serializeContents(double[] value,
JsonGenerator jgen,
SerializerProvider provider) |
serialize, serializeWithTypehasContentTypeAnnotation, withValueTypeSerializercreateObjectNode, createSchemaNode, createSchemaNode, findConvertingContentSerializer, getSchema, handledType, isDefaultSerializer, wrapAndThrow, wrapAndThrowgetDelegatee, isUnwrappingSerializer, replaceDelegatee, unwrappingSerializer, usesObjectIdpublic StdArraySerializers.DoubleArraySerializer()
public ContainerSerializer<?> _withValueTypeSerializer(TypeSerializer vts)
_withValueTypeSerializer in class ContainerSerializer<double[]>public JavaType getContentType()
ContainerSerializergetContentType in class ContainerSerializer<double[]>public JsonSerializer<?> getContentSerializer()
ContainerSerializerContainerSerializer.getContentType() and
SerializerProvider.findValueSerializer(java.lang.Class<?>, com.fasterxml.jackson.databind.BeanProperty).getContentSerializer in class ContainerSerializer<double[]>public boolean isEmpty(double[] value)
JsonSerializerDefault implementation will consider only null values to be empty.
isEmpty in class ContainerSerializer<double[]>public boolean hasSingleElement(double[] value)
ContainerSerializerNote: although it might seem sensible to instead define something like "getElementCount()" method, this would not work well for containers that do not keep track of size (like linked lists may not).
hasSingleElement in class ContainerSerializer<double[]>public void serializeContents(double[] value,
JsonGenerator jgen,
SerializerProvider provider)
throws IOException,
JsonGenerationException
serializeContents in class ArraySerializerBase<double[]>IOExceptionJsonGenerationExceptionpublic JsonNode getSchema(SerializerProvider provider, Type typeHint)
StdSerializergetSchema in interface SchemaAwaregetSchema in class StdSerializer<double[]>provider - The serializer provider.typeHint - A hint about the type.public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException
StdSerializeracceptJsonFormatVisitor in interface JsonFormatVisitableacceptJsonFormatVisitor in class StdSerializer<double[]>typeHint - Type of element (entity like property) being visitedJsonMappingExceptionCopyright © 2012-2013 FasterXML. All Rights Reserved.