ZingChart creates graphs based on data stored in a JSON object. JSON is a light weight data interchange based on JavaScript objects. JSON is supported by many languages which makes it very convient to use with ZingChart. A JSON packet can be created in any server side language and then passed to the ZingChart graph. It is simple to pass name/value pairs, objects, and arrays. Whitespace can be used liberally and will add in readability if you expect human inspection.
JSON is often compared to XML as it serves as an XML alternative. We chose to use JSON because it is easily consummed by JavaScript and ActionScript, easy to create on the server, often smaller than XML, and more reader friendly.
For more information on JSON, see http://json.org.
Key/Value Pairs:
{
"type":"line",
"alpha":1,
"background-color":"#ffffff",
}
Object Assignment:
{
"title":{
"font-color":"#2A606C",
"text":"Graph Title",
"background-color":"#ffffff"
}
}
Arrays:
{
"series":[
{
"values":[179,1,19,129,29,9,79,4,9,14]
}
]
}