Class SimpleDataFieldJsonSerializer
java.lang.Object
com.emc.documentum.rest.parser.json.writer.field.AbstractFieldJsonSerializer
com.emc.documentum.rest.parser.json.writer.field.SimpleDataFieldJsonSerializer
- All Implemented Interfaces:
AnnotatedFieldBindingProcessor,AnnotatedFieldSerializer<com.emc.documentum.rest.parser.json.writer.TypeJsonWriter>
JSON field writer for simple data type.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanserializable(Object fieldValue, SerializableFieldMeta fieldNode) Check if the field value and field type is serializable by this serializer.voidserialize(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.voidserializeKeyValue(com.emc.documentum.rest.parser.json.writer.TypeJsonWriter writer, String serializableName, Object fieldValue, org.springframework.http.MediaType mediaType, 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
-
Constructor Details
-
SimpleDataFieldJsonSerializer
public SimpleDataFieldJsonSerializer()
-
-
Method Details
-
serializeKeyValue
public void serializeKeyValue(com.emc.documentum.rest.parser.json.writer.TypeJsonWriter writer, String serializableName, Object fieldValue, org.springframework.http.MediaType mediaType, com.emc.documentum.rest.config.BindingConfig bindingConfig) Description copied from class:AbstractFieldJsonSerializerSerializes 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:
serializeKeyValuein classAbstractFieldJsonSerializer- Parameters:
writer- message writerserializableName- the serializable name of the field to serializefieldValue- the object value to serializemediaType- content type of target representationbindingConfig- the binding configuration
-
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:AnnotatedFieldSerializerSerialize the field.- Parameters:
writer- message writervalue- field valuefieldNode- the serializable field metamediaType- the target media type to serializebindingConfig- the binding configuration
-
serializable
Description copied from interface:AnnotatedFieldSerializerCheck if the field value and field type is serializable by this serializer.- Parameters:
fieldValue- the field valuefieldNode- the serializable field meta- Returns:
trueif the field value is serializable;falseotherwise.
-