as.character.tbl_json uses jsonlite::toJSON behind the scenes. However, jsonlite::toJSON has multiple parameters that ought to either be selected wisely or passed along to the user (with ..., perhaps).
For the digits parameter, at least, setting digits=NA will preserve decimal integrity and is probably a better option in as.character than the default of 4.
as.character.tbl_json
usesjsonlite::toJSON
behind the scenes. However,jsonlite::toJSON
has multiple parameters that ought to either be selected wisely or passed along to the user (with...
, perhaps).In particular:
For the
digits
parameter, at least, settingdigits=NA
will preserve decimal integrity and is probably a better option inas.character
than the default of4
.