<PackageReference Include="System.Text.Json" Version="10.0.7" />

System.Text.Json.JsonWriterOptions

public struct JsonWriterOptions
Allows the user to define custom behavior when writing JSON using the Utf8JsonWriter.
namespace System.Text.Json { public struct JsonWriterOptions { public JavaScriptEncoder Encoder { get; set; } public bool Indented { get; set; } public char IndentCharacter { get; set; } public int IndentSize { get; set; } public int MaxDepth { get; set; } public bool SkipValidation { get; set; } public string NewLine { get; set; } } }