encode R objects as json. WARNING - function is not properly tested for all edge cases.
Aims for speed and simplicity. For complex cases consider to use jsonlite or rjson packages.
Usage
to_json(x, unbox = TRUE)
Arguments
x
an R object. Lists (possibly named and nested) and arrays are supported
unbox
whether to unbox (simplify) arrays consists of a single element