I've got a 2-dimensional array of values in JSON format:
[[57, 2], [57, 2], [58, 2], [55, 2], [60, 2], [54, 1], [59, 11]]
Each of the pairs actually contains a pair of unrelated readings, and there is one pair for each minute. So in the first min, reading 1 is 57
and reading 2 is 2
. In the second minute, the readings are the same, etc.
Now, I want to convert this into a format I can use in .Net to plot each of these readings. This could either be two parallel arrays, one for the readings of the first value with one element for each minute, and one array for all the readings of the second value. Or it could be a 2-dimensional array if this is easier.
I tried using DataContractJSONSerializer
without any luck:
IEnumerable<SubmissionDataRow> obj = (IEnumerable<SubmissionDataRow>)ser.ReadObject(reader, false);
where SubmissionDataRow
is just a class with a property for each of the readings but the Deserializer wouldn't know what value to put in which property!