I am trying to generate the following json output using the java net.sf.json libs but have been unsuccessful.
[
{
“data”: [
[
1,
1,
“Text”
],
[
2,
2,
“Text”
],
[
3,
0,
“Text”
],
[
5,
2,
“Text”
]
],
“label”: “First Series”
}
]
I have read on these forums Gson is my best bet going forward. Can anyone provide an example of how to generate this json using Gson or another suitable java based library.
Thanks in advance
i like this
http://www.json.org/javadoc/org/json/JSONObject.html from http://json.org/java/
and JSONArray.
with those 2 objects: