jeroenooms/jsonlite — pull request #18 by kbroman (2014-05-06 04:01:47+00:00)
Title: round -> formatC for converting numbers

Would you consider changing from `round()` to `formatC()` for converting numbers? This is what [RJSONIO](https://github.com/duncantl/RJSONIO) did.

With `round`, we lose relative precision in small numbers (say 0.00091) or keep unnecessarily high precision in large numbers (say 8310.1341).

Issues that made this more complicated:
- just switching to `formatC`, though, has the problem that very large integers get rounded
- also, `formatC` pads with leading spaces