I have JSON with Dictionary of string-key with value-arrays. There are his structure below:
{
"NameA":{
"ParametersA":[
[104.3,5.368783],
[104.212,2.57357],...,
],
"ParametersB":[
[104.3,5.368783],
[104.212,2.57357],...,
]
},
"NameB":{
"ParametersA":[
[104.3,5.368783],
[104.212,2.57357],...,
],
"ParametersB":[
[104.3,5.368783],
[104.212,2.57357],...,
]
},
"ThousandsNamesN":{[...]
}
}
I create class for this to obtain data like this: Dictionaty<key=NameA, value=List<Parameters>> and parameters is another class with to arrays A and B.
This is my Root class:
internal class RawDepth
{
public Dictionary<string, Parameters> Names { get; set; }
internal class Parameters
{
[JsonProperty("ParametersA")]
public IList<Orders> A { get; set; }
[JsonProperty("ParametersB")]
public IList<ParamsArray> B { get; set; }
}
internal class ParamsArray
{
public decimal[,] _Orders { get; set; }
}
}
I catchs a null reference exception. I tried create class different ways, but I still can't deserialise it. What I doing wrong?