to_json: Simple JSON encoder

View source: R/json.R

to_jsonR Documentation

Simple JSON encoder

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

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

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


dselivanov/RestRserve documentation built on March 9, 2024, 8:13 p.m.