json_type: Query the JSON type

Description Usage Arguments Value Examples

View source: R/json_type.R

Description

The JSON types are

Usage

1
json_type(x, path = NULL)

Arguments

x

A JSON vector

path

Path to element. This must be a valid JSONpath expression. For example "$.a.b[0] extracts the 1 in {"a": {"b": [1, 2]}}.

Value

A character vector of JSON types

Examples

1
json_type(c(NA, "1", "null", "[1,2]", '{"a": 1}'))

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