Converts ndjson into R objects
from_ndjson(ndjson, simplify = TRUE, fill_na = FALSE)
new-line delimited JSON to convert to R object. Can be a string, url or link to a file.
logical, if TRUE
, coerces JSON to the simplest R object possible. See Details
logical, if TRUE
and simplify
is TRUE
,
data.frames will be na-filled if there are missing JSON keys.
Ignored if simplify
is FALSE
. See details and examples.
js <- to_ndjson( data.frame( x = 1:5, y = 6:10 ) )
from_ndjson( js )
#> x y
#> 1 1 6
#> 2 2 7
#> 3 3 8
#> 4 4 9
#> 5 5 10