json數(shù)組格式?
示例說明
JSON 格式表示數(shù)組保存名字的數(shù)組: ["張三","李四","王五"]
保存雇員的信息: ["smith",1001,"clerck",7788,2000.00,200.0]
[
["smith",1001,"clerck",7788,2000.00,200.0]
["smith",1001,"clerck",7788,2000.00,200.0]
["smith",1001,"clerck",7788,2000.00,200.0]
]
[
{"name":"smith","empno":1001,"job":"clerck","sal":9000.00,"comm":5000.00},
{"name":"smith","empno":1001,"job":"clerck","sal":9000.00,"comm":5000.00},
{"name":"smith","empno":1001,"job":"clerck","sal":9000.00,"comm":5000.00},
]
Demo: 對象數(shù)組
在一個數(shù)組保存多個 json 對象 (在一個數(shù)組中保存多個對象)
[
{
"title":"Java 開發(fā)",
"edition":3,
"author":["smith","張三","李四"]
},
{
"title":"Web 開發(fā)",
"edition":3,
"author":["Allen","王五","趙六"]
}
]
二維數(shù)組保存
[
["Java 開發(fā)",3,["smith","張三","李四"]],
["Web 開發(fā)",3["Allen","王五","趙六"]]
]