Package com.emc.documentum.rest.parser.json.writer.field

# Class MapFieldJsonSerializer

java.lang.Object
com.emc.documentum.rest.parser.json.writer.field.AbstractFieldJsonSerializer
com.emc.documentum.rest.parser.json.writer.field.MapFieldJsonSerializer

All Implemented Interfaces:
  `AnnotatedFieldBindingProcessor`, `AnnotatedFieldSerializer<com.emc.documentum.rest.parser.json.writer.TypeJsonWriter>`

public class MapFieldJsonSerializer extends AbstractFieldJsonSerializer
JSON field writer for map data type.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MapFieldJsonSerializer()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `serializable(Object fieldValue, SerializableFieldMeta fieldNode)`
  Check if the field value and field type is serializable by this serializer.
  `void`
  `serialize(com.emc.documentum.rest.parser.json.writer.TypeJsonWriter writer, Object value, SerializableFieldMeta fieldNode, org.springframework.http.MediaType mediaType, com.emc.documentum.rest.config.BindingConfig bindingConfig)`
  Serialize the field.
  `void`
  `serializeKeyValue(com.emc.documentum.rest.parser.json.writer.TypeJsonWriter writer, String serializableName, Object fieldValue, org.springframework.http.MediaType contentType, com.emc.documentum.rest.config.BindingConfig bindingConfig)`
  Serializes the object in a map as the entry value.

  ### Methods inherited from class com.emc.documentum.rest.parser.json.writer.field.AbstractFieldJsonSerializer

  `isCompatibleMediaType, serializeValue`

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

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

- ## Constructor Details

  - ### MapFieldJsonSerializer

    public MapFieldJsonSerializer()

- ## Method Details

  - ### serialize

    public void serialize(com.emc.documentum.rest.parser.json.writer.TypeJsonWriter writer, Object value, SerializableFieldMeta fieldNode, org.springframework.http.MediaType mediaType, com.emc.documentum.rest.config.BindingConfig bindingConfig)
    Description copied from interface: `AnnotatedFieldSerializer`
    Serialize the field.
    Parameters:
      `writer` - message writer
      `value` - field value
      `fieldNode` - the serializable field meta
      `mediaType` - the target media type to serialize
      `bindingConfig` - the binding configuration

  - ### serializeKeyValue

    public void serializeKeyValue(com.emc.documentum.rest.parser.json.writer.TypeJsonWriter writer, String serializableName, Object fieldValue, org.springframework.http.MediaType contentType, com.emc.documentum.rest.config.BindingConfig bindingConfig)
    Description copied from class: `AbstractFieldJsonSerializer`
    Serializes the object in a map as the entry value. This method must be implemented if the target object supports to be serialized in a map.
    Overrides:
      `serializeKeyValue` in class `AbstractFieldJsonSerializer`
    Parameters:
      `writer` - message writer
      `serializableName` - the serializable name of the field to serialize
      `fieldValue` - the object value to serialize
      `contentType` - content type of target representation
      `bindingConfig` - the binding configuration

  - ### serializable

    public boolean serializable(Object fieldValue, SerializableFieldMeta fieldNode)
    Description copied from interface: `AnnotatedFieldSerializer`
    Check if the field value and field type is serializable by this serializer.
    Parameters:
      `fieldValue` - the field value
      `fieldNode` - the serializable field meta
    Returns:
      `true` if the field value is serializable; `false` otherwise.