Encode R objects as JSON. Wrapper around jsonlite::toJSON
with
default parameters set to following values:
dataframe = 'columns', auto_unbox = unbox, null = 'null', na = 'null'
.
to_json(x, unbox = TRUE)
the object to be encoded
TRUE
by default. Whether to unbox (simplify) arrays consists
of a single element
JSON string
to_json(NULL)
#> [1] "null"
to_json(list(name = "value"))
#> [1] "{\"name\":\"value\"}"