-1

How to convert json to list and dictionary in C# recursively it child (like python).

Example

{"array1":
[
    object1:
    {
        "property1": "value1",
        "property2": "value2"
    }
]}

After convert I have an array name array1. array1[0] return a dictionary. array1[0]["property1"] return "value1".

I want to do it recursively. Because I dont know structure of this json.

Erik Philips
  • 53,428
  • 11
  • 128
  • 150
Duong Nhat
  • 129
  • 1
  • 1
  • 11
  • If you don't know the structure of the JSON how do you know it's a dictionary? – Erik Philips Jan 12 '18 at 10:40
  • Your data isn't actually a valid JSON object. Is this a typo or do you get data like this? – Jerodev Jan 12 '18 at 10:42
  • I have worked with pythone. With python, I dont need a class and mapping json to create a object. I just create an object and use it as a List or dict. – Duong Nhat Jan 12 '18 at 14:00

1 Answers1

-1

if you dont know structure of this json. use json.net jsonpath

enter link description here

fli
  • 1