tests/empty.R

library(RJSONIO)

str = "[ 1, {}, [1, 3, 5] ]"
v = fromJSON(str)
str1 = toJSON(v, collapse = " ")

stopifnot( any( duplicated( gsub("[[:space:]]", "", c(str, str1)))))

Try the RJSONIO package in your browser

Any scripts or data that you put into this service are public.

RJSONIO documentation built on Nov. 27, 2023, 5:09 p.m.