Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

* The return value of `actionButton()`/`actionLink()` changed slightly: `label` and `icon` are wrapped in an additional HTML container element. This allows for: 1. `updateActionButton()`/`updateActionLink()` to distinguish between the `label` and `icon` when making updates and 2. spacing between `label` and `icon` to be more easily customized via CSS.

* The internal (not `jsonlite::`) implementation of `toJSON` now converts named vectors to named lists in order to avoid jsonlite's message when `keep_vec_names=TRUE`.

# shiny 1.11.1

This is a patch release primarily for addressing the bugs introduced in v1.11.0.
Expand Down
8 changes: 7 additions & 1 deletion R/shiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ toJSON <- function(x, ..., dataframe = "columns", null = "null", na = "null",
# https://github.com/jeroen/jsonlite/commit/728efa9
digits = getOption("shiny.json.digits", I(16)), use_signif = is(digits, "AsIs"),
force = TRUE, POSIXt = "ISO8601", UTC = TRUE,
rownames = FALSE, keep_vec_names = TRUE, strict_atomic = TRUE) {
rownames = FALSE, keep_vec_names = TRUE, strict_atomic = TRUE, fix_vec_names = TRUE) {

# jsonlite complains about named _vectors_, so we'll force all
# named-vectors to be named-lists
if (fix_vec_names) {
x <- lapply(x, function(L) if (is.null(names(L))) L else as.list(L))
}

if (strict_atomic) {
x <- I(x)
Expand Down