public class ObjectArraySerializer extends StdArraySerializers.ArraySerializerBase<Object[]> implements ResolvableSerializer
Object[]
).JsonSerializer.None
Modifier and Type | Field and Description |
---|---|
protected PropertySerializerMap |
_dynamicSerializers
If element type can not be statically determined, mapping from
runtime type to serializer is handled using this object
|
protected JsonSerializer<Object> |
_elementSerializer
Value serializer to use, if it can be statically determined.
|
protected JavaType |
_elementType
Declared type of element entries
|
protected boolean |
_staticTyping
Whether we are using static typing (using declared types, ignoring
runtime type) or not for elements.
|
_property, _valueTypeSerializer
_handledType
Constructor and Description |
---|
ObjectArraySerializer(JavaType elemType,
boolean staticTyping,
TypeSerializer vts,
BeanProperty property)
Deprecated.
since 1.8
|
ObjectArraySerializer(JavaType elemType,
boolean staticTyping,
TypeSerializer vts,
BeanProperty property,
JsonSerializer<Object> elementSerializer) |
Modifier and Type | Method and Description |
---|---|
protected JsonSerializer<Object> |
_findAndAddDynamic(PropertySerializerMap map,
Class<?> type,
SerializerProvider provider) |
protected JsonSerializer<Object> |
_findAndAddDynamic(PropertySerializerMap map,
JavaType type,
SerializerProvider provider) |
ContainerSerializerBase<?> |
_withValueTypeSerializer(TypeSerializer vts) |
JsonNode |
getSchema(SerializerProvider provider,
Type typeHint)
Note: since Jackson 1.9, default implementation claims type is "string"
|
void |
resolve(SerializerProvider provider)
Need to get callback to resolve value serializer, if static typing
is used (either being forced, or because value type is final)
|
void |
serializeContents(Object[] value,
JsonGenerator jgen,
SerializerProvider provider) |
void |
serializeContentsUsing(Object[] value,
JsonGenerator jgen,
SerializerProvider provider,
JsonSerializer<Object> ser) |
void |
serializeTypedContents(Object[] value,
JsonGenerator jgen,
SerializerProvider provider) |
serialize, serializeWithType
withValueTypeSerializer
createObjectNode, createSchemaNode, createSchemaNode, handledType, isDefaultSerializer, wrapAndThrow, wrapAndThrow, wrapAndThrow, wrapAndThrow
isUnwrappingSerializer, unwrappingSerializer
protected final boolean _staticTyping
protected final JavaType _elementType
protected JsonSerializer<Object> _elementSerializer
protected PropertySerializerMap _dynamicSerializers
@Deprecated public ObjectArraySerializer(JavaType elemType, boolean staticTyping, TypeSerializer vts, BeanProperty property)
public ObjectArraySerializer(JavaType elemType, boolean staticTyping, TypeSerializer vts, BeanProperty property, JsonSerializer<Object> elementSerializer)
public ContainerSerializerBase<?> _withValueTypeSerializer(TypeSerializer vts)
_withValueTypeSerializer
in class ContainerSerializerBase<Object[]>
public void serializeContents(Object[] value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonGenerationException
serializeContents
in class StdArraySerializers.ArraySerializerBase<Object[]>
IOException
JsonGenerationException
public void serializeContentsUsing(Object[] value, JsonGenerator jgen, SerializerProvider provider, JsonSerializer<Object> ser) throws IOException, JsonGenerationException
IOException
JsonGenerationException
public void serializeTypedContents(Object[] value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonGenerationException
IOException
JsonGenerationException
public JsonNode getSchema(SerializerProvider provider, Type typeHint) throws JsonMappingException
SerializerBase
getSchema
in interface SchemaAware
getSchema
in class SerializerBase<Object[]>
provider
- The serializer provider.typeHint
- A hint about the type.JsonMappingException
public void resolve(SerializerProvider provider) throws JsonMappingException
resolve
in interface ResolvableSerializer
provider
- Provider that has constructed serializer this method
is called on.JsonMappingException
protected final JsonSerializer<Object> _findAndAddDynamic(PropertySerializerMap map, Class<?> type, SerializerProvider provider) throws JsonMappingException
JsonMappingException
protected final JsonSerializer<Object> _findAndAddDynamic(PropertySerializerMap map, JavaType type, SerializerProvider provider) throws JsonMappingException
JsonMappingException