Convert R object to JSON string

to_json_str(x, opts = list(), ...)

Arguments

x

the object to be encoded

opts

Named list of serialization options. Usually created by to_opts()

...

Other named options can be used to override any options in opts. The valid named options are identical to arguments to to_opts()

Value

Character string

See also

Other JSON Serializer: to_json_file()

Examples

if (FALSE) {
to_json_str(iris, pretty = TRUE)
to_json_str(iris, opts = to_opts(auto_unbox = FALSE))
}