tests/testthat/test-format_json_rowwise.R

test_that("format_json_rowwise works", {
  expect_equal(
    format_json_rowwise(tibble(a = 1:2, b = c("x", "y"))),
    new_json2(c(
      '{"a":1,"b":"x"}',
      '{"a":2,"b":"y"}'
    ))
  )
})

Try the jsontools package in your browser

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

jsontools documentation built on March 22, 2021, 5:06 p.m.