JsonWriterOptions Struct

Definition

Allows the user to define custom behavior when writing JSON using the Utf8JsonWriter.

public value class JsonWriterOptions
public struct JsonWriterOptions
type JsonWriterOptions = struct
Public Structure JsonWriterOptions
Inheritance
JsonWriterOptions

Remarks

By default, the JSON is written without any indentation or extra white space. Also, Utf8JsonWriter throws an exception if the user attempts to write structurally invalid JSON.

For more information, see How to serialize and deserialize JSON.

Properties

Encoder

Gets or sets the encoder to use when escaping strings, or null to use the default encoder.

Indented

Gets or sets a value that indicates whether the Utf8JsonWriter should format the JSON output, which includes indenting nested JSON tokens, adding new lines, and adding white space between property names and values.

SkipValidation

Gets or sets a value that indicates whether the Utf8JsonWriter should skip structural validation and allow the user to write invalid JSON.

Applies to