RegistryStrategy
object is used to intercept the serialization process and delegate to custom converters. The custom converters are resolved from a Registry
object, which is provided to the constructor. If there is no binding for a particular object then serialization is delegated to an internal strategy. All converters resolved by this are instantiated once and cached internally for performance. By default the TreeStrategy
is used to perform the normal serialization process should there be no class binding 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.