Make jsonlite::toJSON convert all objects

By default, toJSON won't convert objects with classes that aren't registered
explicitly. This caused errors when converting html_dependency objects.
Setting this option causes jsonlite to convert all objects, including
html_dependency objects.
This commit is contained in:
Winston Chang
2015-01-21 15:09:12 -06:00
parent dfe725dd78
commit ab4dc641af

View File

@@ -80,7 +80,8 @@ createUniqueId <- function(bytes, prefix = "", suffix = "") {
toJSON <- function(x, ..., digits = getOption("shiny.json.digits", 16)) {
jsonlite::toJSON(x, dataframe = "columns", null = "null", na = "null",
auto_unbox = TRUE, digits = digits, use_signif = TRUE, ...)
auto_unbox = TRUE, digits = digits, use_signif = TRUE,
force = TRUE, ...)
}
# Call the workerId func with no args to get the worker id, and with an arg to