New JS Client interface for JSON-C Requests

14 views
Skip to first unread message

monsur

unread,
Feb 23, 2010, 5:31:53 PM2/23/10
to Google Data Javascript Client
Hi all. YouTube recently released a new JSON format called JSON-C.
It is much more compact and intuitive than the old JSON
representation; you can learn more about it here:

http://apiblog.youtube.com/2010/02/new-format-for-json-results.html

In order to support this JSON-C format, we've added a new experimental
interface to the Google Data JavaScript Client. This interface is a
big change from how the existing client makes requests. We are making
this interface public so that we can get feedback from developers
about how it feels. You can learn more here:

http://code.google.com/p/gdata-javascript-client/wiki/JSONCSupportInTheJavascriptClient

Feel free to experiment with this API, and let us know what you
think! Love it? hate it? We want to know!

Thanks,
Monsur

Bobby

unread,
Feb 23, 2010, 11:56:14 PM2/23/10
to Google Data Javascript Client
Makes sense to me. The size of the current GData JS API can be
reduced, with no loss to developers.

For example, the current API has getters and setters, which make sense
in Java but in JS, with the absence of method security and code
completion, just add weight. Using myFeed.entries[0].title instead of
myFeed.getEntries()[0].getTitle().getValue() is just as good but it
eliminates the need to load the JS object type declarations.

The concept of self-documenting code doesn't work for JS APIs. A
compact JS API supported by good documentation in my opinion is the
best approach.
The documentation can be combined with the JS code in the form of a
GWT library, which will give developers the best of both worlds.

A very thin, system agnostic, JS client implementation that receives
and returns JSON objects is good enough. It would be compact, work
with all GData services automatically and require little maintenance,
since developers can just use the GData protocol/system documentation
directly, rather than JS documentation.

Bobby

On Feb 23, 5:31 pm, monsur <mon...@gmail.com> wrote:
> Hi all.  YouTube recently released a new JSON format called JSON-C.
> It is much more compact and intuitive than the old JSON
> representation; you can learn more about it here:
>
> http://apiblog.youtube.com/2010/02/new-format-for-json-results.html
>
> In order to support this JSON-C format, we've added a new experimental
> interface to the Google Data JavaScript Client.  This interface is a
> big change from how the existing client makes requests.  We are making
> this interface public so that we can get feedback from developers
> about how it feels.  You can learn more here:
>

> http://code.google.com/p/gdata-javascript-client/wiki/JSONCSupportInT...

Reply all
Reply to author
Forward
0 new messages