tests/testthat/test-from_json_conn.R

test_that("parsing json from connection works", {
  
  js1 <- read_json_file("examples/test.json")
  
  con <- gzfile("examples/test.json.gz")
  js2 <- read_json_conn(gzfile("examples/test.json.gz"))
  close.connection(con)
  
  expect_identical(js1, js2)
})

Try the yyjsonr package in your browser

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

yyjsonr documentation built on May 29, 2024, 3:01 a.m.