Usage
fromJSON(txt, simplifyVector = TRUE,
simplifyDataFrame = simplifyVector,
simplifyMatrix = simplifyVector) toJSON(x, dataframe = c("rows", "columns"),
Date = c("ISO8601", "epoch"),
POSIXt = c("string", "ISO8601", "epoch", "mongo"),
factor = c("string", "integer"),
complex = c("string", "list"),
raw = c("base64", "hex", "mongo"),
na = c("null", "string"), digits = 2, pretty = FALSE,
...)
Arguments
x
the object to be encoded
dataframe
how to encode data.frame objects: must
be one of 'row' or 'column'
Date
how to encode Date objects: must be one of
'ISO8601' or 'epoch'
POSIXt
how to encode POSIXt (datetime) objects:
must be one of 'string', 'ISO8601', 'epoch' or 'mongo'
factor
how to encode factor objects: must be one
of 'string' or 'integer'
complex
how to encode complex numbers: must be one
of 'string' or 'list'
raw
how to encode raw objects: must be one of
'base64', 'hex' or 'mongo'
digits
max number of digits (after the dot) to
print for numeric values
na
how to print NA values. One of 'null' or
'string'. Defaults are class specific
pretty
adds indentation whitespace to JSON output.
See prettify
txt
a string in json format
simplifyVector
automatically coerse JSON arrays
containing only scalars into a vector
simplifyDataFrame
automatically coerse JSON arrays
containing records (JSON objects with scalars) into a
data frame.
simplifyMatrix
automatically coerse JSON arrays
with vectors of equal length and mode into a matrix
...
arguments passed on to class specific
print
methods