json_options: JSON options

Description Usage Arguments

Description

Helper function for toJSON conversion settings. These arguments are passed to toJSON

Usage

1
2
3
4
5
6
json_options(dataframe = c("rows", "columns", "values"),
  matrix = c("rowmajor", "columnmajor"), Date = c("ISO8601", "epoch"),
  POSIXt = c("string", "ISO8601", "epoch", "mongo"), factor = c("string",
  "integer"), complex = c("string", "list"), raw = c("base64", "hex",
  "mongo"), null = c("list", "null"), na = c("null", "string"),
  auto_unbox = TRUE, digits = 4, pretty = FALSE, force = FALSE, ...)

Arguments

dataframe

how to encode data.frame objects: must be one of 'rows', 'columns' or 'values'

matrix

how to encode matrices and higher dimensional arrays: must be one of 'rowmajor' or 'columnmajor'.

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'

null

how to encode NULL values within a list: must be one of 'null' or 'list'

na

how to print NA values: must be one of 'null' or 'string'. Defaults are class specific

auto_unbox

automatically unbox all atomic vectors of length 1. It is usually safer to avoid this and instead use the unbox function to unbox individual elements. An exception is that objects of class AsIs (i.e. wrapped in I()) are not automatically unboxed. This is a way to mark single values as length-1 arrays.

digits

max number of decimal digits to print for numeric values. Use I() to specify significant digits. Use NA for max precision.

pretty

adds indentation whitespace to JSON output. Can be TRUE/FALSE or a number specifying the number of spaces to indent. See prettify

force

unclass/skip objects of classes with no defined JSON mapping

...

arguments passed on to class specific print methods


bergant/jsondiff documentation built on May 22, 2019, 12:37 p.m.