JsonSerializerOptions.AllowOutOfOrderMetadataProperties Property

Definition

Allows JSON metadata properties to be specified after regular properties in a deserialized JSON object.

C#
public bool AllowOutOfOrderMetadataProperties { get; set; }

Property Value

Exceptions

This property is set after serialization or deserialization has occurred.

Remarks

When set to true, removes the requirement that JSON metadata properties, such as $id and $type, be specified at the very start of the deserialized JSON object. If you enable this setting, it can result in over-buffering when deserializing large JSON payloads in the context of streaming deserialization.

Applies to

Toode Versioonid
.NET 8 (package-provided), 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)