Many websites expose their data through web services. These services usually fall into two categories, SOAP or REST. Many data APIs now tend to prefer the more lightweight REST, which is what we will use in this recipe.
A REST service will usually provide its data in the XML or JSON format. JSON is actually a way of representing data in a piece of JavaScript code. This makes it easy for JavaScript applications to use the data.
For instance, the data we've previously used could look like the following code snippet:
{ "data" : { "0": [20, 50], "50": [70, 40], "100": [0, 100], "150": [150, 150], "200": [300, 200], "250": [200, 170], "300": [170, 160], "350": [20, 120], "400": [60, 80], "450": [250, 150], "500": [90, 20], "550": [50, 40], "600": [110, 90], "650": [150, 150], "700": [320, 200] } }
You'll notice many similarities with ActionScript. More information on the JSON format can be found at http...