ajv.compile: The Ajv.compile method

Description Usage Arguments Value

View source: R/validator_methods.R

Description

Create an Ajv validator function from a schema

Usage

1
ajv.compile(this, schema)

Arguments

this

An AJV instance, provided implicitly when called via my_instance$compile(...)

schema

The Schema with which to validate the data. 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.

Value

an AJV validation function


ajv documentation built on May 2, 2019, 2:11 p.m.