Discover Packages
github.com/jonasfj/go-jsschema
validator
package
Version:
v0.0.0-...-a6a4234
Opens a new window with list of versions in this module.
Published: Oct 18, 2016
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Validator struct {
}
Validator is an object that wraps jsval.JSVal, and
can be used to validate an object against a schema
New creates a new Validator from a JSON Schema
Compile takes the underlying schema and compiles
the validator from it.
You usually should NOT use this method (the main
reason this is exposed is for benchmarking), as it
is automatically called when `Validate` is called.
Validate takes an arbitrary piece of data and
validates it against the schema.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.