File: read_json.Rd

package info (click to toggle)
r-cran-jsonlite 1.9.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,340 kB
  • sloc: ansic: 3,792; sh: 9; makefile: 6
file content (43 lines) | stat: -rw-r--r-- 1,162 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_json.R
\name{read_json}
\alias{read_json}
\alias{parse_json}
\alias{write_json}
\title{Read/write JSON}
\usage{
read_json(path, simplifyVector = FALSE, ...)

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

write_json(x, path, ...)
}
\arguments{
\item{path}{file on disk}

\item{simplifyVector}{simplifies nested lists into vectors and data frames. See \code{\link[=fromJSON]{fromJSON()}}.}

\item{...}{additional conversion arguments, see also \code{\link[=toJSON]{toJSON()}} or \code{\link[=fromJSON]{fromJSON()}}}

\item{json}{string with literal json or connection object to read from}

\item{x}{an object to be serialized to JSON}
}
\description{
These functions are similar to \code{\link[=toJSON]{toJSON()}} and \code{\link[=fromJSON]{fromJSON()}} except they
explicitly distinguish between path and literal input, and do not simplify
by default.
}
\examples{
tmp <- tempfile()
write_json(iris, tmp)

# Nested lists
read_json(tmp)

# A data frame
read_json(tmp, simplifyVector = TRUE)
}
\seealso{
\code{\link[=fromJSON]{fromJSON()}}, \code{\link[=stream_in]{stream_in()}}
}