JSON Interoperability Example

# JSON Interop Using JSNI

This example application demonstrates a simple approach to interoperating with services that return their output in JSON format. It uses GWT's JavaScript Native Interface (JSNI) to analyze a JSON response and create Java-accessible objects. The JSON classes in this sample are general-purpose and can be reused in other projects if you find them useful.

When you click the "Search" button below, you can browse the cached results of a Yahoo JSON image search for "potato." The response is parsed into Java objects which are used to populate a tree view below.

- For more details on how the JSON response is parsed into a set of Java objects, see the JSONParser class.
- The search URL used in this example was http://api.search.yahoo.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&query=potato&results=2&output=json.

JSON Response Tree View