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

NLog.LayoutRenderers.Wrappers.JsonEncodeLayoutRendererWrapper

Escapes output of another layout using JSON rules.
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 JsonEncode { get; set; }

Gets or sets whether output should be encoded with Json-string escaping.