public static void Main()
Foo foo = new Foo { Data = new byte[] { 0x48, 0x49, 0x1d, 0x52, 0x53, 0x1d, 0x56, 0x57, 0x00 } };
string json = JsonSerializer.Serialize(foo);
Foo fah = JsonSerializer.Deserialize<Foo>(json);
fah = JsonSerializer.Deserialize<Foo>("{\"Data\":[48, 49, 10, 52, 53, 10, 56, 57, 00 ]}");
private static void DumpBytes(byte[] b)
for (int i = 0; i < b.Length; i++)
Console.Write(c.ToString("X2") + " ");
public byte[] Data { get; set; }