Learn R Programming

jsontools (version 0.1.0)

parse_json_vector: Parse a vector of JSON into a list

Description

Parse a vector of JSON into a list

Usage

parse_json_vector(
  x,
  .na = json_na_error(),
  .null = NULL,
  simplifyVector = TRUE,
  simplifyDataFrame = FALSE,
  simplifyMatrix = FALSE,
  flatten = FALSE,
  bigint_as_char = bigint_default(),
  ...
)

Arguments

x

a scalar JSON character

.na

Value to return if x is NA. By default an error of class jsontools_error_na_json is thrown.

.null

Return the prototype of .null if x is NULL or a zero length character

simplifyVector

passed on to jsonlite::parse_json.

simplifyDataFrame

passed on to jsonlite::parse_json.

simplifyMatrix

passed on to jsonlite::parse_json.

flatten

passed on to jsonlite::parse_json.

bigint_as_char

Parse big integers as character? The option jsontools.bigint_as_char is used as default.

...

passed on to jsonlite::parse_json.

Value

A list of the same length as x.

Examples

Run this code
# NOT RUN {
parse_json_vector(x = c('"a"', '"b"'))
parse_json_vector(x = c('"a"', '["b", "c"]'))
parse_json_vector(x = c('"a"', NA), .na = 1)
# }

Run the code above in your browser using DataLab