Jnesbeth / google-gson

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

long type can't convert right #280

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
just use java long data type.
the problem caused by the java long type is 64 bit,javascript long type is 53 
bit.So the data lost.

What is the expected output? What do you see instead?
suggest use string to convert long type.

What version of the product are you using? On what operating system?
newest version.

Please provide any additional information below.

Original issue reported on code.google.com by zhangbo...@gmail.com on 29 Jan 2011 at 2:08

GoogleCodeExporter commented 9 years ago
see 
http://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/L
ongSerializationPolicy.html

Original comment by radio...@ya.ru on 10 Feb 2011 at 12:41

GoogleCodeExporter commented 9 years ago
As stated above, this can be achieved by using the LongSerializationPolicy with 
the GsonBuilder. This feature has been available since 1.3 release, so you 
should be able to use this functionality now.

Original comment by joel.leitch@gmail.com on 14 Feb 2011 at 10:42