CrystalXmlSerializerDefaults

Namespace: SnowBank.Data.Xml · enum

Implements: IComparable, ISpanFormattable, IFormattable, IConvertible

List of default configurations for source-generated XML converters

Fields

DataContractCompat

DataContractCompat = 2

The format produced by DataContractSerializer: contract namespaces, data contract names, ordinal member ordering, i:nil and i:type markers, qualified-name type annotations, and unhashed KeyValueOfXY dictionary elements

A container with this preset produces what DataContractSerializer would have produced for the same type, POCO or [DataContract] alike. Element names come from the data contract, so combining this preset with a naming policy is rejected at build time. A declaration this output can prove nothing uses is omitted, and the ones that remain are written on the first element that needs them, so a document carries fewer declarations than the reference serializer writes and the same expanded names. To strip namespaces and prefixes altogether, see .

General

General = 1

The standard, neutral XML format: element names follow the container's JSON naming policy, a null member is absent by default, and dictionaries default to Direct

Inherit

Inherit = 0

Derive the XML format from the container's JSON profile: a DataContractCompat JSON profile yields the DataContract XML format, anything else yields General