using System.Collections.Generic;
public static void Main()
var options = new JsonWriterOptions
using(var stream = new MemoryStream())
using(var writer = new Utf8JsonWriter(stream, options))
writer.WriteStartObject();
writer.WriteString("hello", "world");
Console.WriteLine(Encoding.UTF8.GetString(stream.ToArray()));
var dict = new Dictionary<string, string>();
Console.WriteLine(JsonSerializer.Serialize(dict));