Package com.norconex.commons.lang.bean.jackson

# Class JsonXmlMapSerializer<T extends Map<?,?>>

java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<T>
com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
com.norconex.commons.lang.bean.jackson.JsonXmlMapSerializer<T>

Type Parameters:
  `T` - Map concrete type

All Implemented Interfaces:
  `com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable`, `com.fasterxml.jackson.databind.jsonschema.SchemaAware`, `com.fasterxml.jackson.databind.ser.ContextualSerializer`, `Serializable`

public class JsonXmlMapSerializer<T extends Map<?,?>> extends com.fasterxml.jackson.databind.ser.std.StdSerializer<T> implements com.fasterxml.jackson.databind.ser.ContextualSerializer
Serializes Map as a list of "entry" elements each having a "key" and "value" child elements. Jackson default serialization of Maps stores the key as the tag name, and it prevents special characters to be used as keys.

See Also:
  - `JsonXmlMap`
  - Serialized Form

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

  `com.fasterxml.jackson.databind.JsonSerializer.None`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DEFAULT_ENTRY_NAME`

  ### Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

  `_handledType`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JsonXmlMapSerializer()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `com.fasterxml.jackson.databind.ser.std.StdSerializer<?>`
  `createContextual(com.fasterxml.jackson.databind.SerializerProvider prov, com.fasterxml.jackson.databind.BeanProperty property)`
  `void`
  `serialize(T map, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider)`

  ### Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

  `_neitherNull, _nonEmpty, acceptJsonFormatVisitor, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow`

  ### Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

  `getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### DEFAULT_ENTRY_NAME

    public static final String DEFAULT_ENTRY_NAME
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### JsonXmlMapSerializer

    public JsonXmlMapSerializer()

- ## Method Details

  - ### createContextual

    public com.fasterxml.jackson.databind.ser.std.StdSerializer<?> createContextual(com.fasterxml.jackson.databind.SerializerProvider prov, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException
    Specified by:
      `createContextual` in interface `com.fasterxml.jackson.databind.ser.ContextualSerializer`
    Throws:
      `com.fasterxml.jackson.databind.JsonMappingException`

  - ### serialize

    public void serialize(T map, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
    Specified by:
      `serialize` in class `com.fasterxml.jackson.databind.ser.std.StdSerializer<T extends Map<?,?>>`
    Throws:
      `IOException`