CrystalJsonOutputAttribute

Namespace: SnowBank.Data.Json · class

Implements: CrystalOutputAttribute

Requests JSON output from a CrystalConverterAttribute container, and carries the parameters of that output

Remarks

Applied on the same partial container class that carries [CrystalConverter] and one or more [CrystalSerializable(...)] attributes. The generated JSON surface is exactly the one the [CrystalJsonConverter] alias produces: the alias is this attribute plus the neutral marker.

Combine it with [CrystalXmlOutput] on the same container to produce both outputs from one set of registered types.

Constructors

CrystalJsonOutputAttribute

CrystalJsonOutputAttribute()

Enables JSON output for this serializer container

CrystalJsonOutputAttribute(CrystalJsonSerializerDefaults defaults)

Enables JSON output for this serializer container

  • defaults — Defaults settings used for the generated converters

Properties

PropertyNameCaseInsensitive

bool PropertyNameCaseInsensitive { get; set; }

Gets or sets the default value of IgnoreCaseForNames.

PropertyNamingPolicy

CrystalJsonKnownNamingPolicy PropertyNamingPolicy { get; set; }

Gets or sets a built-in naming policy to convert JSON property names with.