I am new to JSON format.
I am trying to pass a Value for a graph in jQuery.
The value that I have to pass is something like
var hours = [
["Jan", 1],
["Feb", 2],
["Mar", 3]
];
In graph this hours is passed to data
var plot_statistics = jQuery.plot($("#site_stat"), [{
data: hours,
label: "Hours Lost"
}]);
I tried to do this using HashMap , but i didn't got the desired output.
final HashMap<String, Number> columnMap = new HashMap<String, Number>();
columnMap.put("jan", num);
Gson gson = new Gson();
gson.toJson(columnMap);
Please Help me to resolve this