R/input-handler.R

Defines functions .onLoad

#' @importFrom shiny registerInputHandler
.onLoad <- function(libname, pkgname) {
  registerInputHandler(
    "shinyHierarchy.value",
    function(data, ...) {
      if (is.null(data)) {
        return(NULL)
      }

      if (is.list(data)) {
        return(data)
      }

      jsonlite::fromJSON(data, simplifyVector = FALSE)
    },
    force = TRUE
  )
}

Try the shinyHierarchy package in your browser

Any scripts or data that you put into this service are public.

shinyHierarchy documentation built on Oct. 2, 2026, 5:09 p.m.