
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
ajv-draft-04
Advanced tools
Ajv with JSON Schema draft-04 support
You need to install both ajv and this package (to allow upgrading ajv without upgrading this package):
npm i ajv ajv-draft-04
// ESM/TypeScript import
import Ajv from "ajv-draft-04"
// Node.js require:
const Ajv = require("ajv-draft-04")
const ajv = new Ajv()
See ajv site for documentation.
npm install
git submodule update --init
npm test
The jsonschema package is a JSON Schema validator that supports various draft versions, including Draft 04. It provides a straightforward way to validate JSON data. Compared to ajv-draft-04, jsonschema is more focused on simplicity and direct implementation of the JSON Schema specification, potentially making it less performant but easier to use for basic validation tasks.
Tiny Validator (tv4) is a lightweight JSON Schema validator that supports Draft 04 of the JSON Schema. It's designed to be simple and fast, making it a good choice for projects that require basic validation without the need for the latest schema features. Compared to ajv-draft-04, tv4 offers a simpler API and smaller footprint at the expense of some of the advanced optimization and features found in AJV.
FAQs
Ajv class for JSON Schema draft-04
The npm package ajv-draft-04 receives a total of 4,779,253 weekly downloads. As such, ajv-draft-04 popularity was classified as popular.
We found that ajv-draft-04 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.