I have newtonsoft json web api project that try to migrate system.text but I cannot figure out how to convert the code below.
public static void SerializeJsonIntoStream(object value, Stream stream)
{
using (var sw = new StreamWriter(stream, new UTF8Encoding(false), 1024, true))
using (var jtw = new JsonTextWriter(sw) { Formatting = Newtonsoft.Json.Formatting.None })
{
var js = new JsonSerializer();
js.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
js.Serialize(jtw, value);
jtw.Flush();
}
}