October 22, 2008
Recently I had the need to consume JSON in ClearBasic. For example, I make a request to a web service, and the service returns a result set in JSON format. I want to display those results within Clarify. JSON JSON (JavaScript Object Notation) is a lightweight data-interchange format. JSON is a pretty popular data transfer format, especially for the web. Here's an example of a simple JSON object: { FirstName: Joe, LastName: SixPack, Programming Languages: [ClearBasic, Perl, Ruby] } A real-world JSON example I can make an HTTP request to a Google API to perform a web search. The result will be in a JSON format. For example, a search for "fcsdk powershell" can be made by using this URL: http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=fcsdk%20powershell The result will be this: {"responseData": {"results":[{"GsearchResultClass":"GwebSearch", "unescapedUrl":"http://blogs.dovetailsoftware.com/blogs/gsherman/archive/2007/04/25/using-the-fcsdk-in-powershell.aspx", "url":"http://blogs.dovetailsoftware.com/blogs/gsherman/archive/2007/04/25/using-the-fcsdk-in-powershell.aspx", "visibleUrl":"blogs.dovetailsoftware.com", "cacheUrl":"http://www.google.com/search?qu003dcache:u9RLwKjiIPYJ:blogs.dovetailsoftware.com", "title":"Gary Sherman : Using the u003cbu003efcSDKu003c/bu003e in u003cbu003ePowerShellu003c/bu003e",…