read_json

0th

Percentile

Read/write JSON

These functions are similar to toJSON and fromJSON except they explicitly distinguish between path and literal input, and do not simplify by default.

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

parse_json(json, simplifyVector = FALSE, ...)

write_json(x, path, ...)

Arguments
path

file on disk

simplifyVector

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

...

additional conversion arguments, see also toJSON or fromJSON

json

string with literal json or connection object to read from

x

an object to be serialized to JSON

See Also

fromJSON, stream_in

Aliases
  • read_json
  • parse_json
  • write_json
Examples
# NOT RUN {
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.7.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.