read_json

0th

Percentile

Read/write JSON

Convenience wrappers around toJSON and fromJSON to read and write directly to/from disk.

Usage
read_json(path, simplifyVector = FALSE, ...)

write_json(x, path, ...)

Arguments
path

file on disk

simplifyVector

simplifies nested lists into vectors and data frames. See fromJSON.

...

additional arguments passed to toJSON or fromJSON

x

an object to be serialized to JSON

Aliases
  • read_json
  • write_json
Examples
tmp <- tempfile()
write_json(iris, tmp)

# Nested lists
read_json(tmp)

# A data frame
read_json(tmp, simplifyVector = TRUE)
Documentation reproduced from package jsonlite, version 1.5, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.