Class StdSerializers.IntegerSerializer

  • All Implemented Interfaces:
    SchemaAware
    Enclosing class:
    StdSerializers

    public static final class StdSerializers.IntegerSerializer
    extends NonTypedScalarSerializerBase<java.lang.Integer>
    This is the special serializer for regular Integers (and primitive ints)

    Since this is one of "native" types, no type information is ever included on serialization (unlike for most scalar types as of 1.5)

    • Constructor Detail

      • IntegerSerializer

        public IntegerSerializer()
    • Method Detail

      • serialize

        public void serialize​(java.lang.Integer value,
                              JsonGenerator jgen,
                              SerializerProvider provider)
                       throws java.io.IOException,
                              JsonGenerationException
        Description copied from class: JsonSerializer
        Method that can be called to ask implementation to serialize values of type this serializer handles.
        Specified by:
        serialize in class SerializerBase<java.lang.Integer>
        Parameters:
        value - Value to serialize; can not be null.
        jgen - Generator used to output resulting Json content
        provider - Provider that can be used to get serializers for serializing Objects value contains, if any.
        Throws:
        java.io.IOException
        JsonGenerationException