parse_json_vector: Parse a vector of JSON into a list

Description Usage Arguments Value Examples

View source: R/read_json.R

Description

Parse a vector of JSON into a list

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

1
2
3
parse_json_vector(x = c('"a"', '"b"'))
parse_json_vector(x = c('"a"', '["b", "c"]'))
parse_json_vector(x = c('"a"', NA), .na = 1)

jsontools documentation built on March 22, 2021, 5:06 p.m.