我有一個要求,使一個JSON結構像一個樹節點,其中一些根節點將在那裏,他們有一些孩子。我的json結構是這樣的我張貼..如何在java中製作分層結構的Json
{
chart: {
caption: "Subscriber Summary Percentage",
xAxisName: "Month",
yAxisName: "% Subscriber",
showvalues: "0",
palette: "1"
},
categories: [
{
category: [
{
label: "JAN"
},
{
label: "FEB"
},
{
label: "MAR"
},
{
label: "APR"
},
{
label: "MAY"
},
{
label: "JUN"
},
{
label: "JUL"
},
{
label: "AUG"
},
{
label: "SEP"
}
]
}
],
dataset: [
{
seriesname: "New Added",
data: [
{
value: "1.1887604"
},
{
value: "2.1255539"
},
{
value: "2.3852911"
},
{
value: "2.9953901000000003"
},
{
value: "2.5770609"
},
{
value: "2.8420104000000004"
},
{
value: "4.543343"
},
{
value: "3.7596994"
},
{
value: "5.0751309000000004"
}
]
},
{
seriesname: "Churned",
data: [
{
value: "2.4009264"
},
{
value: "2.4021593"
},
{
value: "2.8101032000000004"
},
{
value: "3.1267909000000005"
},
{
value: "3.790831"
},
{
value: "3.9487281"
},
{
value: "4.533631"
},
{
value: "5.0275186"
},
{
value: "5.4198564"
}
]
}
]
}
這是我的json結構任何人都可以幫我嗎?
你在使用JSON庫嗎? –