Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parsing JSON on google app engine (java)

i use org.json library to work with JSON-data in my apps. But it seems that google app engine doesn't allow to use it, what's the best way to work with JSON on GAE-apps?

like image 329
user1049280 Avatar asked Apr 10 '12 10:04

user1049280


4 Answers

I had the similar question a week ago and after comparing a number of Java JSON libraries (including JSonLIB and GSON) I have chosen Jackson. Check other comparisons on StackOverflow, most of them would recommend Jackson out of the rest.

After two weeks using it on Google Appengine, I just love it. Not only it has more features than the other mentioned libraries, it is also much faster (see benchmarks here). It is a Json engine in Jersey which I would recommend as well if you want to do anything Restful on Appengine.

It is stable and still actively developed, with version 2 has just been released couple of weeks ago.

UPDATE: here is a sample demo for using Jackson with GAE.

like image 188
husayt Avatar answered Oct 15 '22 18:10

husayt


try Gson

http://code.google.com/p/google-gson/

like image 28
Nagaraju Badaeni Avatar answered Oct 15 '22 16:10

Nagaraju Badaeni


I hope this helps

you can also the google-json api here

like image 34
AurA Avatar answered Oct 15 '22 16:10

AurA


Use fast JSON is a very productive API. Jackson take too much code.

http://code.alibabatech.com/wiki/display/FastJSON/Home

https://github.com/alibaba/fastjson

Just copy the library into WEB-INF/lib folder and use the static methods of com.alibaba.fastjson.JSON like JSON.toJSONString(object)

like image 42
Daniel De León Avatar answered Oct 15 '22 16:10

Daniel De León