com.fasterxml.jackson.databind.ser.std
Class StaticListSerializerBase<T extends Collection<?>>
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<T>
com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
com.fasterxml.jackson.databind.ser.std.StaticListSerializerBase<T>
- All Implemented Interfaces:
- SchemaAware
- Direct Known Subclasses:
- IndexedStringListSerializer, StringCollectionSerializer
public abstract class StaticListSerializerBase<T extends Collection<?>>
- extends StdSerializer<T>
Intermediate base class for Lists, Collections and Arrays
that contain static (non-dynamic) value types.
Method Summary |
protected abstract JsonNode |
contentSchema()
|
JsonNode |
getSchema(SerializerProvider provider,
Type typeHint)
Default implementation simply claims type is "string"; usually
overriden by custom serializers. |
boolean |
isEmpty(T value)
Method called to check whether given serializable value is
considered "empty" value (for purposes of suppressing serialization
of empty values). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StaticListSerializerBase
protected StaticListSerializerBase(Class<?> cls)
isEmpty
public boolean isEmpty(T value)
- Description copied from class:
JsonSerializer
- Method called to check whether given serializable value is
considered "empty" value (for purposes of suppressing serialization
of empty values).
Default implementation will consider only null values to be empty.
- Overrides:
isEmpty
in class JsonSerializer<T extends Collection<?>>
getSchema
public JsonNode getSchema(SerializerProvider provider,
Type typeHint)
- Description copied from class:
StdSerializer
- Default implementation simply claims type is "string"; usually
overriden by custom serializers.
- Specified by:
getSchema
in interface SchemaAware
- Overrides:
getSchema
in class StdSerializer<T extends Collection<?>>
- Parameters:
provider
- The serializer provider.typeHint
- A hint about the type.
- Returns:
- Json-schema for this serializer.
contentSchema
protected abstract JsonNode contentSchema()
Copyright © 2012 fasterxml.com. All Rights Reserved.