R/to_json.R

Defines functions to_json

Documented in to_json

#' Function to quickly use \code{jsonlite::toJSON}.
#' 
#' @param x An R object.
#' 
#' @param pretty Should the JSON object be pretty printed? Default is 
#' \code{TRUE}. 
#' 
#' @author Stuart K. Grange
#' 
#' @export
to_json <- function(x, pretty = TRUE) 
  jsonlite::toJSON(x, pretty = pretty, digits = NA, auto_unbox = TRUE)
skgrange/systemr documentation built on April 18, 2024, 2:23 a.m.