json2: Construct a json2 object

View source: R/json.R

json2R Documentation

Construct a json2 object

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

json2(x = character())

new_json2(x = character())

as_json2(x)

is_json2(x)

Arguments

x

A character vector.

Value

A json2 vector.

Examples

json2()
json2('{"abc": 1}')

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

mgirlich/jsontools documentation built on March 21, 2023, 9:10 a.m.