Closed GoogleCodeExporter closed 9 years ago
What version of Gson are you using?
It appears that this bug was fixed in the 1.2 release. This bug should not
resurface
since we added a test to ensure "null"s in lists are properly serialized
(http://www.google.com/codesearch/p?hl=en#1W0hTXRl0vg/trunk/gson/src/test/java/c
om/google/gson/functional/CollectionTest.java&q=testNullsInListSerialization%20p
ackage:http://google-gson\.googlecode\.com).
A side note:
Inderjeet and I hope to release a new version of Gson, 1.3, before the new year
(but
that is an aggressive goal).
Original comment by joel.leitch@gmail.com
on 28 Dec 2008 at 2:21
I test the Gson 1.3 release. But still has the problem,
java.lang.NullPointerException
at
com.google.gson.DefaultTypeAdapters$CollectionTypeAdapter.serialize
(DefaultTypeAdapters.java:414)
I also checked the URL and ran the CollectionTest.java ,but I found a different
between your class and mine.
I use
String s6=g.toJson(t6);
and the test class user
Type typeOfList = new TypeToken<List<String>>() {}.getType();
String json = g.toJson(list, typeOfList);
That why mine failed.
Original comment by iamj...@gmail.com
on 24 Jun 2009 at 5:12
Original issue reported on code.google.com by
iamj...@gmail.com
on 25 Dec 2008 at 1:18