<PackageReference Include="NLog" Version="6.2.0" />

NLog.Targets.JsonSerializeOptions

public class JsonSerializeOptions
Options for JSON serialization
public bool EnumAsInteger { get; set; }

Serialize enum as integer value.

public bool EscapeForwardSlash { get; set; }

Should forward slashes be escaped? If true, / will be converted to \/

public bool EscapeUnicode { get; set; }

Should non-ascii characters be encoded.

public string Format { get; set; }

Format string for value

public IFormatProvider FormatProvider { get; set; }

Format provider for value

public int MaxRecursionLimit { get; set; }

How far down the rabbit hole should the Json Serializer go with object-reflection before stopping

public bool QuoteKeys { get; set; }

Add quotes around object keys?

public bool SanitizeDictionaryKeys { get; set; }

Should dictionary keys be sanitized. All characters must either be letters, numbers or underscore character (_). Any other characters will be converted to underscore character (_)

public bool SuppressSpaces { get; set; }

Gets or sets the option to suppress the extra spaces in the output json.