gavioto / playn

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

Removal of JSON int, float and double methods #144

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Purpose of code changes on this branch:
The JSON code did not properly handle long values, instead long was (silently) 
promoted to double which caused loss of precision.

This patch removes the specialized int, float and double value methods, leaving 
only the value method that takes Number. All primitive value types (aside from 
boolean) will be boxed and passed to the Number method, which will write them 
with no loss of precision into the JSON.

When reviewing my code changes, please focus on:
https://github.com/threerings/playn/commit/25ad49bff6b283d06ee0e244c06beb8f57bbe
d2f

After the review, I'll merge this branch into:
/trunk

Original issue reported on code.google.com by samskiv...@gmail.com on 5 Mar 2012 at 10:42