Serialization standards and polymorphic type support for serialized objects.
The descrminator used to determine what type the object is included in the Json output.
Subtypes for a known base type can be determined via reflection at runtime using the ResolveSubTypesAutomatically
method.
When a RemoveProcedure
from the previous sample is serialized the following json is produced.
Subtypes for a known base type can be explicitly registered and configured on a per-type basis.
When a RemoveProcedure
from the previous sample is serialized the following json is produced.
Attributes can be used to declare what types should serialize to preserve object types.
When a type that inherits from this IProcedure
is serialized, the following json is produced.
An explicit set of types that are serializable can be declared ahead-of-time.
Attributes can also be used on the child types.
Using either of the previous demos, when a RemoveProcedure
is serialized the following json is produced.