read_json {jsonlite} | R Documentation |
Convenience wrappers around toJSON and fromJSON to read and write directly to/from disk.
read_json(path, simplifyVector = FALSE, ...) write_json(x, path, ...)
path |
file on disk |
simplifyVector |
simplifies nested lists into vectors and data frames. See fromJSON. |
... |
|
x |
an object to be serialized to JSON |
tmp <- tempfile() write_json(iris, tmp) # Nested lists read_json(tmp) # A data frame read_json(tmp, simplifyVector = TRUE)