Class MapEntryAsPOJOSerializer

  • All Implemented Interfaces:
    JsonFormatVisitable, SchemaAware, java.io.Serializable

    public class MapEntryAsPOJOSerializer
    extends StdSerializer<java.util.Map.Entry<?,​?>>
    Serializer used to serialize Map.Entry as POJOs: that is, as if introspected as POJOs so that there's intermediate "key" and "value" properties.

    TODO: does not fully handle contextualization, type resolution and so on.

    Since:
    2.19
    See Also:
    Serialized Form
    • Method Detail

      • serialize

        public void serialize​(java.util.Map.Entry<?,​?> value,
                              JsonGenerator gen,
                              SerializerProvider ctxt)
                       throws java.io.IOException
        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 StdSerializer<java.util.Map.Entry<?,​?>>
        Parameters:
        value - Value to serialize; can not be null.
        gen - Generator used to output resulting Json content
        ctxt - Provider that can be used to get serializers for serializing Objects value contains, if any.
        Throws:
        java.io.IOException