IvanConrad / google-gson

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

Wrong convertion in deserialization from int object #427

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Im deserializing an first object then
2. Im decompressing a field from this object then
3. Im deserializing this object decompressed.

What is the expected output? What do you see instead?
 I was expecting a int return after deserialization. A double value.

What version of the product are you using? On what operating system?
 Gson 2.1  in Windows 7 64bits

Please provide any additional information below.

 In my application Im comunicating with the server using json data
for the comunication. In second deserialization all objects that shoud
be integers are Double

Original issue reported on code.google.com by pedrohms...@gmail.com on 30 Mar 2012 at 7:53

Attachments:

GoogleCodeExporter commented 9 years ago
 Im using the gson in android 2.2

Original comment by pedrohms...@gmail.com on 30 Mar 2012 at 7:57

GoogleCodeExporter commented 9 years ago
deserialize function is here

Original comment by pedrohms...@gmail.com on 30 Mar 2012 at 8:43

Attachments:

GoogleCodeExporter commented 9 years ago
Is the target type an int? The best way to fix this is to make sure your target 
value is typed the way you want it.

Original comment by limpbizkit on 10 Apr 2012 at 2:10

GoogleCodeExporter commented 9 years ago
thanks for answering. My type has to be an Object class because it must be of 
any type to be stored.

Original comment by pedrohms...@gmail.com on 10 Apr 2012 at 2:27