RJSONIO
RJSONIO copied to clipboard
Don't emit whitespace padding around numeric data
Without this change, this is the behavior you get:
> RJSONIO::toJSON(head(cars, 3), digits = 12)
[1] "{\n \"speed\": [ 4, 4, 7 ],\n\"dist\": [ 2, 10, 4 ] \n}"
With this change:
> RJSONIO::toJSON(head(cars, 3), digits = 12)
[1] "{\n \"speed\": [ 4, 4, 7 ],\n\"dist\": [ 2, 10, 4 ] \n}"
The space savings are significant for many uses of Shiny and htmlwidgets.