Top Description Fields Constructors Methods
com.fasterxml.jackson.databind.ser.impl

public Class FailingSerializer

extends StdSerializer<Object>
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.io.IOException, com.fasterxml.jackson.core.*, com.fasterxml.jackson.databind.JsonMappingException, .SerializerProvider, com.fasterxml.jackson.databind.ser.std.StdSerializer

Deprecated

as a consequence of StdSerializer being deprecated. See corresponding docs for further information.

Special bogus "serializer" that will throw JsonMappingException if its serialize gets invoked. Most commonly registered as handler for unknown types, as well as for catching unintended usage (like trying to use null as Map/Object key).

Field Summary

Modifier and TypeField and Description
protected final String
Inherited from com.fasterxml.jackson.databind.ser.std.StdSerializer:
_handledType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
serialize(Object
Value to serialize; can not be null.
value
,
JsonGenerator
Generator used to output resulting Json content
g
,
SerializerProvider
Provider that can be used to get serializers for serializing Objects value contains, if any.
ctxt
)

Implements abstract com.fasterxml.jackson.databind.ser.std.StdSerializer.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.
Inherited from com.fasterxml.jackson.databind.ser.std.StdSerializer:
_neitherNull_nonEmptyacceptJsonFormatVisitorcreateSchemaNodecreateSchemaNodefindAnnotatedContentSerializerfindContextualConvertingSerializerfindConvertingContentSerializerfindFormatFeaturefindFormatOverridesfindIncludeOverridesfindPropertyFiltergetSchemagetSchemahandledTypeisDefaultSerializervisitArrayFormatvisitArrayFormatvisitFloatFormatvisitIntFormatvisitIntFormatvisitStringFormatvisitStringFormatwrapAndThrowwrapAndThrow

Field Detail

_msgback to summary
protected final String _msg

Constructor Detail

FailingSerializerback to summary
public FailingSerializer(String msg)

Method Detail

serializeback to summary
public void serialize(Object value, JsonGenerator g, SerializerProvider ctxt) throws IOException

Implements abstract com.fasterxml.jackson.databind.ser.std.StdSerializer.serialize.

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

Method that can be called to ask implementation to serialize values of type this serializer handles.

Parameters
value:Object

Value to serialize; can not be null.

g:JsonGenerator

Generator used to output resulting Json content

ctxt:SerializerProvider

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

Annotations
@Override