Closed GoogleCodeExporter closed 9 years ago
Please post coding questions like this on our Google Group
(https://groups.google.com/forum/#!forum/google-gson) instead of creating bug
reports.
Not sure if your example is correct. Here are a few suggestions:
new GsonBuilder().create() is same as new Gson()
You are not using Type tmp anywhere.
In any case, you can get it simply as: Integer.class or int.class
gson.toJson() should print all the fields of Function. Please post complete
working code on Google group and someone will be able to help you better.
Original comment by inder123
on 1 Jul 2011 at 9:54
Serializing types is actually somewhat of a security problem, so we don't want
to support it by default. A malicious .json file could cause your application
to load classes that it wouldn't otherwise; depending on your class path
loading certain classes could DoS your application.
But it's quite straightforward to write a type adapter to support this in your
own app.
Original comment by limpbizkit
on 1 Jul 2011 at 9:56
Original issue reported on code.google.com by
DRDO.YOG...@gmail.com
on 1 Jul 2011 at 5:23