Learn R Programming

ajv (version 1.0.0)

ajv.addSchema: A wrapper for the Ajv.addSchema method

Description

The add a schema to an Ajv instance

Usage

ajv.addSchema(this, schema, key)

Arguments

this
An AJV instance, provided implicitly when called via my_instance$addSchema(...)
schema
The schema to be added. schema may be a valid JSON string, an R object (i.e. `list(...)`), a connection to a JSON file, or the name of a JSON or YAML file. YAML files are parsed via [js-yaml](https://www.npmjs.com/package/js-yaml)'s `safeLoad()` method.
key
String; the name with which to store the schema

Value

invisible(NULL)

See Also

Other AJV.Instance.Methods: ajv.addFormat, ajv.addKeyword, ajv.errorsText, ajv.keyword, ajv.removeSchema, ajv.validateSchema, ajv.validate

Examples

Run this code
## Not run: ------------------------------------
# my_ajv_instance = Ajv()
# my_ajv_instance$addSchema
## ---------------------------------------------

Run the code above in your browser using DataLab