Google Web Toolkit and Web Services: The JSON/JSONP Way

Analysis
Nov 7, 20111 min

In the first part of this series, we studied how to implement and use a server-side proxy to contact a remote service, and how to use the Google Web Toolkit (GWT) to process the XML results from the Google Geocoding API. For many applications, however, JSON (JavaScript Object Notation) is an even better fit than XML for GWT, since it can be easily processed with JavaScript. Let’s see how to use this alternative format, and, by the way, discover how to do so without any server-side proxies by means of JSON with Padding (JSONP), an interesting extension of the JSON concept.