Parsing complicated Json Array in C# -
this question has answer here:
i have json array:
{ "array":[ { "name_0":"value_0", "name_1":"value_1" }, { "name_2":"value_2", "name_3":"value_3", "name_4":"value_4", "name_5":"value_5" } ] }
the data structures inside json array not consistent. how can parse them in c#? thanks!
one way be
var serializer = new javascriptserializer(); var data = serializer .deserialize<dictionary<string, list<dictionary<string, string>>>>(input);
this because json data structure this. innermost element have dictionary<string, string>
nested in generic list in turn nested in generic dictionary.
Comments
Post a Comment