首页 > 代码库 > JSON数据格式

JSON数据格式

http://blog.csdn.net/ninibinbin/article/details/3445936

[
    {
        "Id": "A",
        "Name": "A",
        "Nodes": {
            "Id": "A01",
            "Name": "A01",
            "Nodes": {
                "Id": "A011",
                "Name": "A011",
                "Nodes": [
                    {
                        "Id": "A0111",
                        "Name": "A0111"
                    },
                    {
                        "Id": "A0111",
                        "Name": "A0112"
                    }
                ]
            }
        }
    },
    {
        "Id": "B",
        "Name": "B",
        "Nodes": {
            "Id": "B01",
            "Name": "B01",
            "Nodes": {
                "Id": "B011",
                "Name": "B011",
                "Nodes": {
                    "Id": "B0111",
                    "Name": "B0111"
                }
            }
        }
    }
]

 

 

注:两个对象并排对象需要使用[]

如:

        "Nodes": [
                    {
                        "Id": "A0111",
                        "Name": "A0111"
                    },
                    {
                        "Id": "A0111",
                        "Name": "A0112"
                    }
                ]