Closed GoogleCodeExporter closed 9 years ago
You can get a JSON formatted output by doing a GET request with "alt=json" query
parameter.
http://code.google.com/apis/gdata/docs/2.0/reference.html#Queries
Original comment by vbarat...@gmail.com
on 12 Nov 2009 at 12:35
I know about the "alt" param. When I do that, I get "invalid content type"
error.
GData-java-client currently doesn't support json. It only supports atom. I hope
you're getting what I intend to convey?
Original comment by nischals...@gmail.com
on 12 Nov 2009 at 2:52
I've attached the screenshot from the article which specifies the same.
http://code.google.com/apis/gdata/docs/json.html
Original comment by nischals...@gmail.com
on 12 Nov 2009 at 2:57
Attachments:
I see. If it is read-only operation you can use json output with custom
client-code
using a JSONObject representation to walk through the values. Technically you
can
use the java core client library to get the auth token, and make your own http
requests to retrieve the json feed and parse it into your data structure
(JSONObject
or your implementation). IMO the genesis JSON parsing does not belong in the
client
library, as this is more likely intended for js clients.
For read-write you cannot post back JSON. So for post/put operation you need
to use xml.
Original comment by vbarat...@gmail.com
on 13 Nov 2009 at 5:41
Thanks for the suggestion. I did not want to reinvent the wheel by requesting
and
parsing since the gdata java api does an excellent job.
I've resolved this problem by instantiating the xerces parser implementation
explicitly in XmlParser.java class. That way, the parser implementation isn't
decided
by resin server :)
Original comment by nischals...@gmail.com
on 13 Nov 2009 at 5:51
Original issue reported on code.google.com by
nischals...@gmail.com
on 12 Nov 2009 at 9:48