parse_json_or_empty {lambdr}R Documentation

Parse a JSON, but force a NULL or empty string to be interpreted as an empty list

Description

Since jsonlite::fromJSON(NULL) and jsonlite::fromJSON("") return errors, this function will force a NULL or empty string to be interpreted as list(). Otherwise, the output of this function is identical to fromJSON.

Usage

parse_json_or_empty(json, ...)

Arguments

json

character to be interpreted as a JSON

...

additional arguments passed to fromJSON

Value

list


[Package lambdr version 1.2.5 Index]