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

NLog.Targets.DefaultJsonSerializer

Default class for serialization of values to JSON format.
public static DefaultJsonSerializer Instance { get; }

Singleton instance of the serializer.

public string SerializeObject(object value)

Returns a serialization of an object into JSON format.

public string SerializeObject(object value, JsonSerializeOptions options)

Returns a serialization of an object into JSON format.

public bool SerializeObject(object value, StringBuilder destination)

Serialization of the object in JSON format to the destination StringBuilder

public bool SerializeObject(object value, StringBuilder destination, JsonSerializeOptions options)

Serialization of the object in JSON format to the destination StringBuilder