public static void Main()
Foo foo = new Foo { Data = new byte[] { 0x00, 0x00, 0x00, 0x01, 0x08, 0x02, 0x59, 0x51 } };
string json = JsonConvert.SerializeObject(foo);
Foo fah = JsonConvert.DeserializeObject<Foo>(json);
private static void DumpBytes(byte[] b)
for (int i = 0; i < b.Length; i++)
Console.Write(c.ToString("X2") + " ");
public byte[] Data { get; set; }