json_wrap_scalars: Wrap scalars in a JSON array

View source: R/array_utils.R

json_wrap_scalarsR Documentation

Wrap scalars in a JSON array

Description

Wrap scalars in a JSON array

Usage

json_wrap_scalars(x)

Arguments

x

A character or numeric vector.

Value

A json2 vector similar to x with the JSON scalars wrapped as JSON array.

Examples

json_wrap_scalars(c('["a", "b"]', "c", "d"))
json_wrap_scalars(c(1, 2))

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