inst/tinytest/test_load_json.R

if (RcppSimdJson:::.unsupportedArchitecture()) exit_file("Unsupported chipset")

all_files <- dir("../jsonexamples", pattern = "\\.json$", 
                 recursive = TRUE, full.names = TRUE)

sapply(all_files, function(.x) expect_silent(RcppSimdJson:::.load_json(.x)))

expect_error(
  RcppSimdJson:::.load_json("../jsonexamples/amazon_cellphones.ndjson")
)

expect_error(
  RcppSimdJson:::.load_json("not/a/real/file.json")
)

Try the RcppSimdJson package in your browser

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

RcppSimdJson documentation built on May 29, 2024, 2:08 a.m.