I have a json which a form like this:
[
{
"sample1" : "example",
"json": "{\"number\":1,\"Files\":\"[{\\\"cols\\\": [\\r\\n {\\r\\n \\\"name\\\": \\\"A\\\",\\r\\n \\\"key\\\": 0\\r\\n },{\\r\\n \\\"name\\\": \\\"B\\\",\\r\\n \\\"key\\\": \\r\\n },{\\r\\n \\\"rows\\\": [\\r\\n [\\r\\n \\\"Example\\\",\\r\\n \\\"1234abcd\\\\r\\\\n(sample)\\\"\\r\\n ],\\r\\n [\\r\\n \\\"example1 \\\",\\r\\n \\\"17 18\\\"\\r\\n ]\\r\\n ]\\r\\n }\\r\\n ]\"}"
}
]
And I want to show like this:
[
{
"sample1": "example",
"json": {
"number":1,
"Files":{
"cols":[
{
"name":"A",
"key":0
},
{
"name":"B",
"key":1
}
],
"rows":
[
[
"Example","1234abcd(sample)"
],
[
"example1","17 18"
]
]
}
}
}
]
However, my code can't parse the first one into the second one. It throw exception NullReferenceException. So how can I resolve the problem?