Google introduced new format for JSON results

Google announced new JSON-C format for Youtube API, in that announcement they mentioned that direct transformation of ATOM to JSON is not very effective and actually make no much sense.
It’s actually not just announcement – they already created docs which explain new format in details.

Our existing JSON format isn’t perfect, however. It’s very much a literal translation from Atom. As is often the case with literal translations, the current JSON format is wordier than it needs to be, and it lacks some of the elegance that a native dialect would offer.

We’ve rethought out current JSON implementation, and moved away from a literal representation of the Atom data to a format that we hope will be more pleasing to those who are fluent in JSON. The vestigial XML namespace prefixes are no more, and we’ve removed many pieces of metadata specific to Atom documents that come across as noise in JSON. Repeating data elements are always structured as true JSON lists, and useful video metadata that exist as XML attributes in Atom have been rearranged to make more sense in the JSON document. You’ll also find that the new JSON results are more compact than Atom XML, which is of special importance to code running from limited-bandwith mobile applications.

Sounds very promising and I have a hope that new format (which is more compact and lightweight) will open the door for mobile devices to use GData API. Especially for Android, which have no official support of GData API. I believe it happens because current protocol (based on quite complex and big ATOM) is not very well suited for mobile devices – it’s too big (network) and complex (performance/memory). Hover there are couple of implementations of existent GData API:

  1. Android-GData – it looks like it is working solution and used by couple of projects, but it’s main drawback that it is too big and have a lot of dependencies
  2. Another solution is to use code which is not included now in the android-platform but still exists in the GIT.

I just tried to use alt=jsonc with calendar and picassa-web-albums and it looks like at least Picassa API also support new Json-C format ! and the generated response is about 2 times smaller than standard JSON.

If you want to see more details from google about JSONC and other GData protocol updates and tricks you can see that youtube-video.  I was wondered to see really nice Partial-GET feature of GData which allow you to enumerate the fields/objects you want to see in the response.


Tagged with: , , , ,
Posted in Software Development
One comment on “Google introduced new format for JSON results
  1. […] Google introduced new format for JSON results Possibly related posts: (automatically generated)…….php?PHP TutorialWhat is PHP? Categories: php Tags: php learing Comments (0) Trackbacks (0) Leave a comment Trackback […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: