<PackageReference Include="Newtonsoft.Json" Version="8.0.1" />

JsonTextWriter

public class JsonTextWriter : JsonWriter
Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
public IArrayPool<char> ArrayPool { get; set; }

Gets or sets the writer's character array pool.

public int Indentation { get; set; }

Gets or sets how many IndentChars to write for each level in the hierarchy when Formatting is set to Formatting.Indented.

public char IndentChar { get; set; }

Gets or sets which character to use for indenting when Formatting is set to Formatting.Indented.

public char QuoteChar { get; set; }

Gets or sets which character to use to quote attribute values.

public bool QuoteName { get; set; }

Gets or sets a value indicating whether object names will be surrounded with quotes.

public JsonTextWriter(TextWriter textWriter)

Creates an instance of the JsonWriter class using the specified TextWriter.