I have been using this method to convert json text to dictionary.
However, when it faced objects in array, the dictionary is completely wrong.
It seems that the list of pairs is correct but the dictionary isn’t.
My sample code:
{
"names": [
{
"name": "Peter",
"age": 30
},
{
"name": "John",
"age": 27
},
{
"name": "Luke",
"age": 34
}
]
}
Thanks in advance.