SwedishPensionsAgency / Coldbir

Column database in R
http://swedishpensionsagency.github.com/Coldbir
11 stars 4 forks source link

RJSONIO:::toJSON - maximum of 50 digits #1

Open reinholdsson opened 11 years ago

reinholdsson commented 11 years ago

Using the RJSONIO package; if there are numbers to be converted to JSON, they are rounded unless one is using the digits parameter (max = 50).

Problem:

> toJSON(123456789)
[1] "[ 1.2346e+08 ]"

> fromJSON(toJSON(123456789))
[1] 123460000

Current solution:

> toJSON(123456789, digits = 50)
[1] "[                                           123456789 ]"

Is there a better solution?

reinholdsson commented 11 years ago

Package rjson doesn't seem to have same problem, however, in turn it lacks support for unicode (e.g. åäö).