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

NLog.Layouts.JsonAttribute

public class JsonAttribute
JSON attribute.
public Layout DefaultValue { get; set; }

Gets or sets the fallback value when result value is not available

public bool Encode { get; set; }

Gets or sets whether output should be encoded as Json-String-Property, or be treated as valid json.

public bool EscapeForwardSlash { get; set; }

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

public bool EscapeUnicode { get; set; }

Gets or sets a value indicating whether to escape non-ascii characters

public bool IncludeEmptyValue { get; set; }

Gets or sets whether empty attribute value should be included in the output.

public Layout Layout { get; set; }

Gets or sets the layout used for rendering the attribute value.

public string Name { get; set; }

Gets or sets the name of the attribute.

public Type ValueType { get; set; }

Gets or sets the result value type, for conversion of layout rendering output

public JsonAttribute()

Initializes a new instance of the JsonAttribute class.

public JsonAttribute(string name, Layout layout)

Initializes a new instance of the JsonAttribute class.

public JsonAttribute(string name, JsonLayout layout)

Initializes a new instance of the JsonAttribute class with JsonLayout and Encode = false.

public JsonAttribute(string name, Layout layout, bool encode)

Initializes a new instance of the JsonAttribute class.