对于 JSON,哪种数据格式更好。要求是能够存储和检索有关在服务器上部署了多少项目的信息。
基于对象的设计
{
"Server1":{
"project1":{
"buildNo":"290",
"deployed":"12/12/2012"
},
"project2":{
"buildNo":"291",
"deployed":"11/12/2012"
},
"project3":{
"buildNo":"209",
"deployed":"11/12/2012"
}
}
}
基于阵列的设计
{
"Server1":[
{"project1":{
"buildNo":"290",
"deployed":"12/12/2012"
}},
{"project2":{
"buildNo":"291",
"deployed":"11/12/2012"
}},
{"project3":{
"buildNo":"209",
"deployed":"11/12/2012"
}}
]
}
请让我知道您对这些方法中的任何一种的看法。