[ "del":[ {"code":1,"name":"zhangsan"}, {"code":1,"name":"zhangsan"}, {"code":1,"name":"zhangsan"}, {"code":1,"name":"zhangsan"} ] ,"del":[ {"code":1,"name":"zhangsan"}, {"code":1,"name":"zhangsan"}, {"code":1,"name":"zhangsan"}, {"code":1,"name":"zhangsan"} ] ]
时间: 2023-07-03 10:28:05 浏览: 127
Unity3D教程:解析Json1
这个JSON格式不太符合规范,因为键名不能重复。如果您想要表示两个不同的数组,可以使用不同的键名,比如这样:
```
{
"del1": [
{"code": 1, "name": "zhangsan"},
{"code": 1, "name": "zhangsan"},
{"code": 1, "name": "zhangsan"},
{"code": 1, "name": "zhangsan"}
],
"del2": [
{"code": 1, "name": "zhangsan"},
{"code": 1, "name": "zhangsan"},
{"code": 1, "name": "zhangsan"},
{"code": 1, "name": "zhangsan"}
]
}
```
这个JSON格式包含了两个数组,分别使用了键名 "del1" 和 "del2"。您可以根据需要修改键名和数组内容。
阅读全文