Learn R Programming

jsontools (version 0.1.0)

json_wrap_scalars: 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

Run this code
# NOT RUN {
json_wrap_scalars(c('["a", "b"]', "c", "d"))
json_wrap_scalars(c(1, 2))
# }

Run the code above in your browser using DataLab