As of version 2.4, jsonschema includes a command-line program to check some input json file against a schema specified in another file.

You can call it like so:

jsonschema -i B.json BSchema.json

Here's some example output from when I put an object where an array should be:

{u'description': u'Doubles resource collection.'}: {u'description': u'Doubles resource collection.'} is not of type u'array'

Answer from cgmb on Stack Overflow
🌐
GitHub
github.com › ajv-validator › ajv-cli
GitHub - ajv-validator/ajv-cli: Command-line interface for Ajv JSON Validator · GitHub
ajv compile -s "schema.json" -o "validate_schema.js" -o without parameter should be used to output code to stdout to pass it to some code formatter. This command also supports parameters -r, -m and -c as in validate command.
Starred by 304 users
Forked by 75 users
Languages   TypeScript 96.5% | JavaScript 3.5%
🌐
Json-buddy
json-buddy.com › json-validator-command-line-tool.htm
Free JSON validator command-line tool for Windows
Easy to use JSON validator to check one or multiple JSON data files. Agent automation: See the ValBuddy Codex skill page for install steps and CI-ready examples. valbuddy.exe -v -verbose -s "D:\Examples\Library\library_schema.json" "D:\Examples\Library\library.json" "D:\Examples\Library\library_invalid.json"
🌐
GitHub
github.com › json-schema-everywhere › pajv
GitHub - json-schema-everywhere/pajv: A command line JSON Schema validator that supports many file formats. Fork of jessedc/ajv-cli. · GitHub
This command asserts that the result of the validation is as expected. pajv test -s test/schema.json -d test/valid_data.json --valid pajv test -s test/schema.json -d test/invalid_data.json --invalid
Starred by 54 users
Forked by 6 users
Languages   JavaScript
🌐
crates.io
crates.io › crates › jsonschema-cli
jsonschema-cli - crates.io: Rust Package Registry
2 weeks ago - A fast command-line tool for JSON Schema validation and bundling, powered by the jsonschema crate.
🌐
Ubuntu
manpages.ubuntu.com › manpages › bionic › man1 › validate-json.1.html
Ubuntu Manpage: validate-json - JSON Schema command line interface
--dump-schema Output full schema and exit --dump-schema-url Output URL of schema --verbose Show additional output --quiet Suppress all output -h --help Show this help validate-json 5.2.6 October 2017
🌐
GitHub
github.com › sourcemeta › jsonschema
GitHub - sourcemeta/jsonschema: The CLI for working with JSON Schema. Covers formatting, linting, testing, bundling, and more for both local development and CI/CD pipelines · GitHub
The command-line tool for working with JSON Schema, the world most popular schema language. It is a comprehensive solution for maintaining repositories of schemas and ensuring their quality, both during local development and when running on ...
Starred by 253 users
Forked by 31 users
Languages   Shell 76.6% | C++ 17.9% | CMake 4.8% | JavaScript 0.5% | Makefile 0.1% | Dockerfile 0.1%
🌐
PyPI
pypi.org › project › jsonschema-cli
jsonschema-cli · PyPI
# Returns no errors on stdout, no output needed on success (just exit code 0 is enough) jsonschema-cli validate '{"properties": {"number": {"type": "integer"}}, "required": ["number"]}' '{"number": 123}' # Has an error, "number" is now "123" ...
      » pip install jsonschema-cli
    
Published   Jun 04, 2020
Version   0.6.2
Find elsewhere
🌐
DeepWiki
deepwiki.com › java-json-tools › json-schema-validator › 5-command-line-interface
Command Line Interface | java-json-tools/json-schema-validator | DeepWiki
June 25, 2025 - This page documents the command-line interface (CLI) tool for the JSON Schema Validator. The CLI provides a standalone executable that can validate JSON instances against schemas and check schema synt
🌐
Xmodulo
xmodulo.com › validate-json-command-line-linux.html
How to validate JSON from the command line on Linux
November 25, 2020 - This tool supports the syntax validation for the latest JSON schema draft v4. It can work standalone from the command line, or can be integrated into Maven build process as a plugin.
🌐
JSON Type Definition
jsontypedef.com › docs › jtd-validate
Validating JSON data in shell scripts with jtd-validate
`set -x` makes # it so that sh/bash/zsh ... will exit # unsuccessfully, immediately halting this shell script. echo "$script_output" | jtd-validate path/to/my/schema.jtd.json...
🌐
GitHub
github.com › wandroll › jsonschema-commandline
GitHub - wandroll/jsonschema-commandline: json validation from command line
Based on jsonschema validator, it is design to ease json validation from command line · Any improvement and feedback is welcome! Install globally with NPM or Yarn · npm install -g jsonschema-commandline · From commandline run : $ jsvalidate -s ...
Author   wandroll
🌐
npm
npmjs.com › package › jsonschema-cli
jsonschema-cli - npm
January 13, 2015 - Latest version: 0.1.2, last published: 11 years ago. Start using jsonschema-cli in your project by running `npm i jsonschema-cli`. There are no other projects in the npm registry using jsonschema-cli.
      » npm install jsonschema-cli
    
Published   Jan 13, 2015
Version   0.1.2
Author   Fritz Mahnke
🌐
GitHub
github.com › zaach › jsonlint
GitHub - zaach/jsonlint: A JSON parser and validator with a CLI. · GitHub
Install jsonlint with npm to use ... to use for indentation [ ] -c, --compact compact error display -V, --validate a JSON schema to use for validation -e, --environment which specification of JSON Schema the validation file ...
Starred by 2K users
Forked by 416 users
Languages   JavaScript 91.2% | HTML 3.8% | Yacc 3.0% | Lex 1.1% | Makefile 0.9%
🌐
npm
npmjs.com › package › jsonschema-commandline
jsonschema-commandline - npm
March 15, 2017 - Based on jsonschema validator, it is design to ease json validation from command line · Any improvment and feedbacks are welcome ! Install gloablly with NPM or Yarn · npm install -g jsonschema-commandline · From commandline run : jsvalidate -s ...
      » npm install jsonschema-commandline
    
Published   Mar 15, 2017
Version   1.0.3
Author   wandrille VERLUT
🌐
Google Groups
groups.google.com › g › json-schema-validator › c › pWrd34YlwBk
How to run json-schema-validator from the command line?
April 4, 2014 - See the README for the project: https://github.com/fge/json-schema-validator. Basically, download the standalone jar from bintray, rename it if you want (let us say, jsonschema.jar) and then you can use it via the command line: # run a syntax checking on one or more schemas; brief mode
🌐
Stack Overflow
stackoverflow.com › questions › 69452886 › how-to-validate-json-schema-against-metaschema-in-linux-cli
command line interface - How to validate json schema against metaschema in linux cli - Stack Overflow
It is recommended to use check-jsonschema instead. It has a --check-metaschema option. This means that it has embedded meta schema files, so there is no need to download meta schema manually anymore. That's good news. The second good news is, that it just works and it is able to validate complex schema documents:
🌐
JSON Schema Validator
jsonschemavalidator.net
JSON Schema Validator - Newtonsoft
public class JsonSchemaController : ControllerBase { [HttpPost] [Route("api/jsonschema/validate")] public ValidateResponse Validate(ValidateRequest request) { // Load schema JSchema schema = JSchema.Parse(request.Schema); JToken json = JToken.Parse(request.Json); // Validate json IList<ValidationError> errors; bool valid = json.IsValid(schema, out errors); // Return error messages and line info to the browser return new ValidateResponse { Valid = valid, Errors = errors }; } } public class ValidateRequest { public string Json { get; set; } public string Schema { get; set; } } public class ValidateResponse { public bool Valid { get; set; } public IList<ValidationError> Errors { get; set; } }
🌐
GitHub
github.com › fmahnke › jsonschema-cli
GitHub - fmahnke/jsonschema-cli: Validate JSON against JSON schema on the command line.
This module provides a simple command line interface to Tom de Grunt's JSON schema validator.
Author   fmahnke