tags:

views:

512

answers:

2

I'm playing arround with google gson for communication with my web back end at the moment. This and this older posts indicate that there are some problems with gson on android.

I did some easy tests on the device already but maybe I just missed the bug.

Edit I'm now parsing a lot more data. Generic lists etc. still not encountered the bug.

Has anybody used gson on Android already? How does it work? Has somebody encountered bugs or something that will stop me from using it once it gets more complicated?

+2  A: 

I've succesfully used it (gson 1.4) with both Android 1.5 and 1.6. No problems at all. The only point is gson still not being able to handle circular references in the objects you try to serialize.

Guido
+1  A: 

I've had problems with it when running in the emulator (Android 1.1) which was fine when testing on my phone (Android 1.5)

I got the following exception when serializing a complex object:

An exception occurred: java.lang.TypeNotPresentException    

Looks like as long as you target a later version of Android (1.5 in my case) you're good to go...

Paul