Class MapEntryAsPOJOSerializer

All Implemented Interfaces:
JsonFormatVisitable

public class MapEntryAsPOJOSerializer extends StdSerializer<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.

  • Constructor Details

    • MapEntryAsPOJOSerializer

      protected MapEntryAsPOJOSerializer(JavaType type)
  • Method Details

    • create

      public static MapEntryAsPOJOSerializer create(SerializationContext ctxt, JavaType type)
    • serialize

      public void serialize(Map.Entry<?,?> value, tools.jackson.core.JsonGenerator gen, SerializationContext ctxt)
      Description copied from class: ValueSerializer
      Method that can be called to ask implementation to serialize values of type this serializer handles.
      Specified by:
      serialize in class StdSerializer<Map.Entry<?,?>>
      Parameters:
      value - Value to serialize; can not be null.
      gen - Generator used to output resulting Json content
      ctxt - Context that can be used to get serializers for serializing Objects value contains, if any.