opts_read_json {yyjsonr} | R Documentation |
Create named list of options for parsing R from JSON
Description
Create named list of options for parsing R from JSON
Usage
opts_read_json(
promote_num_to_string = FALSE,
df_missing_list_elem = NULL,
obj_of_arrs_to_df = TRUE,
arr_of_objs_to_df = TRUE,
str_specials = c("string", "special"),
num_specials = c("special", "string"),
int64 = c("string", "double", "bit64"),
length1_array_asis = FALSE,
yyjson_read_flag = 0L
)
Arguments
promote_num_to_string |
Should numeric values be promoted to strings
when they occur within an array with other string values? Default: FALSE
means to keep numerics as numeric value and promote the container to
be a |
df_missing_list_elem |
R value to use when elements are missing in list columns in data.frames. Default: NULL |
obj_of_arrs_to_df |
logical. Should a named list of equal-length vectors be promoted to a data.frame? Default: TRUE. If FALSE, then result will be left as a list. |
arr_of_objs_to_df |
logical. Should an array or objects be promoted to a a data.frame? Default: TRUE. If FALSE, then results will be read as a list-of-lists. |
str_specials |
Should |
num_specials |
Should JSON strings 'NA'/'Inf'/'NaN' in a numeric context
be converted to the |
int64 |
how to encode large integers which do not fit into R's integer type. 'string' imports them as a character vector. 'double' will convert the integer to a double precision numeric value. 'bit64' will use the 'integer64' type from the 'bit64' package. Note that the 'integer64' type is a signed integer type, and a warning will be issued if JSON contains an unsigned integer which cannot be stored in this type. |
length1_array_asis |
logical. Should JSON arrays with length = 1 be
marked with class |
yyjson_read_flag |
integer vector of internal |
Value
Named list of options for reading JSON
See Also
Examples
opts_read_json()