AnnotationStrategy
object is used to intercept the serialization process and delegate to custom converters. This strategy uses the Convert
annotation to specify the converter to use for serialization and deserialization. If there is no annotation present on the field or method representing the object instance to be serialized then this acts as a transparent proxy to an internal strategy. By default the TreeStrategy
is used to perform the normal serialization process should there be no annotation specifying a converter to use. However, any implementation can be used, including the CycleStrategy
, which handles cycles in the object graph. To specify the internal strategy to use it can be provided in the constructor.