discomarathon / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

Trivial bug in user guide #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the user guide, on collection types, this is said:

----
(Deserialization)
Type collectionType = new TypeToken<Collection<Integer>>(){}.getType();
Collection<Integer> ints2 = gson.fromJson(collectionType, json);
ints2 is same as ints
----

Yet, gson.fromJson is most likely taking the String argument first, and
then the Type arguments.

Original issue reported on code.google.com by nuutti.k...@gmail.com on 26 Mar 2009 at 1:28

GoogleCodeExporter commented 9 years ago
Fixed. Thanks for the bug report. This was a vestige from a very early 
implementation 
of Gson where the type parameter actually came first. 

Original comment by inder123 on 27 Mar 2009 at 7:26