read_json | R Documentation |
These functions are similar to toJSON()
and fromJSON()
except they
explicitly distinguish between path and literal input, and do not simplify
by default.
read_json(path, simplifyVector = FALSE, ...)
parse_json(json, simplifyVector = FALSE, ...)
write_json(x, path, ...)
path |
file on disk |
simplifyVector |
simplifies nested lists into vectors and data frames. See |
... |
additional conversion arguments, see also |
json |
string with literal json or connection object to read from |
x |
an object to be serialized to JSON |
fromJSON()
, stream_in()
tmp <- tempfile()
write_json(iris, tmp)
# Nested lists
read_json(tmp)
# A data frame
read_json(tmp, simplifyVector = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.