R version 4.5.0 RC (2025-04-03 r88103 ucrt) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(RJSONIO) > > stopifnot(is.list(fromJSON('[1, "2.3", "abc"]', simplify = Strict))) > > stopifnot(is.character(fromJSON('[1, "2.3", "abc"]', simplify = TRUE))) > > stopifnot(is.character(fromJSON('[1, true, "2.3", "abc"]', simplify = TRUE))) > > stopifnot(is.list(fromJSON('[1, true, "2.3", "abc"]', simplify = Strict))) > > stopifnot(is.list(fromJSON('[1, true]', simplify = Strict))) > stopifnot(is.numeric(fromJSON('[1, true]', simplify = TRUE))) > > stopifnot(is.character(fromJSON('["1", true]', simplify = TRUE))) > > > stopifnot(is.character(fromJSON('{ "a": "1", "b": true}', simplify = TRUE))) > stopifnot(is.list(fromJSON('{ "a": "1", "b": true}', simplify = Strict))) > > stopifnot(is.character(fromJSON('{ "a": "1", "b": "true"}', simplify = Strict))) > > stopifnot(is.numeric(fromJSON('{ "a": 1, "b": 2}', simplify = Strict))) > > stopifnot(is.list(fromJSON('{ "a": 1, "b": 2}', simplify = FALSE))) > > > is.na(fromJSON(toJSON( c("a", NA, "b", "c")), nullValue = NA, simplify = TRUE)) [1] FALSE TRUE FALSE FALSE > is.na(fromJSON(toJSON( c(1, NA, 3, 4)), nullValue = NA, simplify = TRUE)) [1] FALSE TRUE FALSE FALSE > > is.na(fromJSON(toJSON( c(TRUE, NA, FALSE, TRUE)), nullValue = NA, simplify = TRUE)) [1] FALSE TRUE FALSE FALSE > > > > > proc.time() user system elapsed 0.15 0.01 0.15