I am fetching a string from a JSON file & want to convert it to Key-Value pair.
I am using JSON.NET for the same.
I know I can deserialize a List using:
List<JsonClass> jsonFileComments = JsonConvert.DeserializeObject<List<JsonClass>>(json); And I can Deserialize a Array using:
Dictionary<string, string> values = JsonConvert.DeserializeObject<Dictionary<string, string>>(json); But as my JSON string contains Lists & Arrays in single file only. The sequence is like:
{ List, List, List, Array, List, Array, List } Can you tell me how can I deserialize it using single way.
Other way is I need to separate out the Arrays & work on separately. And again while Serializing I need to work that stuff.