JsonSerializerOptions.PropertyNameCaseInsensitive Property

Definition

Gets or sets a value that indicates whether a property's name uses a case-insensitive comparison during deserialization. The default value is false.

C#
public bool PropertyNameCaseInsensitive { get; set; }

Property Value

true if property names are compared case-insensitively; otherwise, false.

Remarks

There is a performance cost associated with case-insensitive comparison (that is, when PropertyNameCaseInsensitive is true).

For more information, see How to enable case-insensitive property name matching with System.Text.Json.

Applies to

Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)