CrystalJsonSerializerDefaults
Namespace: SnowBank.Data.Json · enum
Implements: IComparable, ISpanFormattable, IFormattable, IConvertible
List of default configurations for source-generated converters
Fields
DataContractCompat
DataContractCompat = 2
For teams coming from DataContractJsonSerializer: the container's generated entry points default to the legacy output (DataContractCompat - numeric enums, \/Date(ms)\/ dates, ISO 8601 durations, pair-array dictionaries, explicit nulls) instead of the standard format.A container with this profile produces what DCJS would have produced for the same type, POCO or [DataContract] alike, with the documented differences. Member names stay as declared (the DCJS output has no naming policy), so combining this profile with a camelCase or case-insensitive naming option is rejected at build time.Explicitly passed settings always replace the profile entirely; settings the baked names cannot honor throw instead of silently producing another output.The dual-container pattern is the intended shape for a progressive portage: not-yet-ported services serialize through a container with this profile, modernized services through a default or Web container over the SAME types; when the portage completes, delete the legacy container.
General
General = 0
General-purpose option values. These are the same settings that are applied if a JsonSerializerDefaults member isn't specified.For information about the default property values that are applied, see JsonSerializerOptions properties.
Web
Web = 1
Option values appropriate to Web-based scenarios.This member implies that:- Property names are treated as case-insensitive.- "camelCase" name formatting should be employed.- Quoted numbers (JSON strings for number properties) are allowed.