public interface JsonSerializable
Note that implementing this interface binds implementing object closely to Jackson API, and that it is often not necessary to do so -- if class is a bean, it can be serialized without implementing this interface.
|Modifier and Type||Interface and Description|
Base class with minimal implementation, as well as couple of extension methods that core Jackson databinding makes use of.
|Modifier and Type||Method and Description|
Serialization method called when no additional type information is to be included in serialization.
Serialization method called when additional type information is expected to be included in serialization, for deserialization to use.
void serialize(JsonGenerator gen, SerializerProvider serializers) throws java.io.IOException
void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws java.io.IOException
Usually implementation consists of a call to one of methods
TypeSerializer (such as
followed by serialization of contents,
followed by another call to
Exact methods to call in
TypeSerializer depend on shape of JSON Object used
(Array, Object or scalar like String/Number/Boolean).
Note that some types (most notably, "natural" types: String, Integer, Double and Boolean) never include type information.
"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"