Converts ndjson into R objects

from_ndjson(ndjson, simplify = TRUE, fill_na = FALSE)

Arguments

ndjson

new-line delimited JSON to convert to R object. Can be a string, url or link to a file.

simplify

logical, if TRUE, coerces JSON to the simplest R object possible. See Details

fill_na

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.

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