I noticed that Atlas uses JSON to serialize/deserialize objects. Has anyone written an example of the best (most efficient, most elegant) way to consume a JSON Web service from an Atlas application?
(An example of the data I'd be going after is here: http://api.search.yahoo.com/ImageSearchService/V1/imageSearch?appid=jeffreymcmanus&query=bill+gates&results=2&output=json)
If you add "&callback=showResults" to the query, it will come back packaged to pass the JSON data into your custom "showResults" javascript method. Basically, you are getting back a string of client script. It's up to you how you want to handle it in the browser with your own javascript.
At least to me, that's the most elegant way, which is pretty much what you asked.
Peter
No comments:
Post a Comment