CrystalJsonSerializableAttribute

Namespace: SnowBank.Data.Json · class

Implements: CrystalSerializableAttribute

Attribute that adds a custom JSON converter for one or more types

Remarks

Any derived type, nested type, or types referenced by the members of these types will also be included in the source code generation.

This is the former, JSON-flavored spelling of the format-neutral CrystalSerializableAttribute: registration never was JSON-specific, and a container that produces XML registers its types the same way. It keeps working (and generates the same code) but new code should use CrystalSerializableAttribute.

Constructors

CrystalJsonSerializableAttribute

CrystalJsonSerializableAttribute(Type type)

Generate a custom converters for instances of this type

  • type — Type that will have a source-generated converter added to this container.

CrystalJsonSerializableAttribute(params Type[] types)

Generate a custom converters for instances of for the following types

  • types — List of types that will have a source-generated converter added to this container.