In C# application, I receive binary data at some point, which are serialized to JObject with structure
{
"0": 255,
"1": 216,
"2": 255,
"3": 224,
"4": 0,
"5": 16,
.
.
.
"12345" : 255
}
, so it's always {"index" : value}. EDIT: the json was just example, the JObject actually has 12345 children of type JToken, where each JToken has name "index" and value JValue (actual binary value).
I need to deserialize this JObject to byte[]
, with only values stored. Is there any smart way to do this, besides going through the object in cycle and storing the values in byte array, one by one?