powered by
Wrap scalars in a JSON array
json_wrap_scalars(x)
A character or numeric vector.
A json2 vector similar to x with the JSON scalars wrapped as JSON array.
json2
x
# 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