12.5. Using JSON with JS overlay

In chapter 11 we talked about how you can create a class that wraps a native JavaScript object with what we referred to as a JavaScript overlay type. In this section we’ll use it in practice to simplify our access to JSON data. Our example in this section is the same as the one used in the previous section, which is to fetch video data from YouTube and display the titles in a TextArea.

Listing 12.7 presents the example, which has only minor changes from the previous listing.

Listing 12.7. Fetching YouTube data using a JS overlay

This is the same example that we presented in the last section, so we’ll only explain ...

Get GWT in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.