Skip to content

JsonDocumentOptions.AllowTrailingCommas Property

Definition

Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: JsonDocumentOptions.cs

AllowTrailingCommas()

Defines whether an extra comma at the end of a list of JSON values in an object or array is allowed (and ignored) within the JSON payload being read.

public bool AllowTrailingCommas { get; set; }

Returns

bool

Remarks

By default, it's set to false, and a JsonException is thrown if a trailing comma is encountered.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests.

Open an issue