json2: Construct a json2 object

Description Usage Arguments Value Examples

View source: R/json.R

Description

new_json2() is a fast, low-level constructor that takes a character vector. json2() checks the input for validity. as_json2() and is_json2() are simple forwarders to vctrs::vec_cast() and vctrs::vec_is() respectively.

Usage

1
2
3
4
5
6
7

Arguments

x

A character vector.

Value

A json2 vector.

Examples

1
2
3
4
5
6
json2()
json2('{"abc": 1}')

new_json2()
new_json2('{"abc": 1}')
new_json2(c('{"abc": 1}', '{"def": 2}', "[1, 2, 3]", NA))

jsontools documentation built on March 22, 2021, 5:06 p.m.