Validate a json file

Usage

json_validate(json, schema, verbose = FALSE, greedy = FALSE, error = FALSE)

Arguments

json
Contents of a json object, or a filename containing one.
schema
Contents of the json schema, or a filename containing a schema.
verbose
Be verbose? If TRUE, then an attribute "errors" will list validation failures as a data.frame
greedy
Continue after the first error?
error
Throw an error on parse failure? If TRUE, then the function returns NULL on success (i.e., call only for the side-effect of an error on failure, like stopifnot).

Description

Validate a single json against a schema. This is a convenience wrapper around json_validator(schema)(json)