to_json: Simple JSON encoder

Description Usage Arguments Value Examples

View source: R/json.R

Description

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'.

Usage

1
to_json(x, unbox = TRUE)

Arguments

x

the object to be encoded

unbox

TRUE by default. Whether to unbox (simplify) arrays consists of a single element

Value

JSON string

Examples

1
2
to_json(NULL)
to_json(list(name = "value"))

RestRserve documentation built on Jan. 13, 2021, 7:05 p.m.