When one has the option to use XML or JSON to communicate with JS libraries, which one would be better?

83 views
Skip to first unread message

MAQ

unread,
Jul 17, 2012, 10:52:32 PM7/17/12
to google-we...@googlegroups.com
Hi,

I hope the question is clear, I'm a total GWT newbie. My project requires the use of some of Google's APIs. Two main solutions are provided one for XML and another for JSON (gdata-java-client and google-api-java-client).

Which one would be more suitable (easier, more compatible etc.)? Or is it a mere personal choice?

Regards,
Mo

Robert W

unread,
Jul 18, 2012, 12:50:51 AM7/18/12
to google-we...@googlegroups.com
I don't understant in what context you use "solution" word but generally json is standard for api use, with gwt overlays mechanism it easy to use in java typing model.

MAQ

unread,
Jul 18, 2012, 1:18:42 AM7/18/12
to google-we...@googlegroups.com
Sorry, I meant 2 options provided by Google APIs.

Ümit Seren

unread,
Jul 18, 2012, 9:50:20 AM7/18/12
to google-we...@googlegroups.com
I would go with JSON. 
It's more compact than XML and seems to become more and more the defacto standard for data communication in the web. 

Richard

unread,
Jul 18, 2012, 12:35:02 PM7/18/12
to google-we...@googlegroups.com
It's likely json will be processed more quickly on the client since it can be done natively, although it does depend on your use case. And json is usually smaller.

Thomas Broyer

unread,
Jul 18, 2012, 12:39:44 PM7/18/12
to google-we...@googlegroups.com

On Wednesday, July 18, 2012 4:52:32 AM UTC+2, MAQ wrote:
With GWT, you'll likely use gwt-google-apis rather than the above 2 projects (which i'd bet are not GWT-compatible). I believe gwt-google-apis uses JSON, but that's a detail, as there aren't actually any existing alternative.

MAQ

unread,
Jul 18, 2012, 12:47:37 PM7/18/12
to google-we...@googlegroups.com
I did look at that project, however it does not include youtube API.
So, if I had to integrate the youtube API with my GWT app, then my best option would be the JSON path?

Thomas Broyer

unread,
Jul 18, 2012, 12:53:18 PM7/18/12
to google-we...@googlegroups.com


On Wednesday, July 18, 2012 6:47:37 PM UTC+2, MAQ wrote:
I did look at that project, however it does not include youtube API.
So, if I had to integrate the youtube API with my GWT app, then my best option would be the JSON path?

Actually rather wrap the JS API.
(this is what gwt-google-apis do AFAICT)
Reply all
Reply to author
Forward
0 new messages