whatisgithub

What is json-schema-test-suite?

relequestual/json-schema-test-suite — explained in plain English

Analysis updated 2026-07-16 · repo last pushed 2022-06-30

PythonAudience · developerComplexity · 2/5DormantSetup · easy

In one sentence

A shared collection of test cases in JSON format for checking whether a JSON Schema validator gives correct results. You load the files, run the checks yourself, and confirm your validator matches the spec.

Mindmap

mindmap
  root((repo))
    What it does
      Standardized test cases
      Checks schema validators
      Language agnostic
    Structure
      Plain JSON files
      Organized by draft version
      Each test has schema and data
    Tech stack
      JSON data files
      Python tooling
    Use cases
      Build a validator
      Test existing validators
      Find spec edge cases
    Audience
      Validator library authors
      Spec implementers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Verify a new JSON Schema validator passes shared, community-maintained test cases.

USE CASE 2

Check if your validator correctly handles edge cases like wrong types and missing required fields.

USE CASE 3

Test your validator against a specific draft version of the JSON Schema spec.

What is it built with?

JSONPython

How does it compare?

relequestual/json-schema-test-suite0xhassaan/nn-from-scratch3ks/embedoc
Stars0
LanguagePythonPythonPython
Last pushed2022-06-302023-06-08
MaintenanceDormantDormant
Setup difficultyeasymoderatehard
Complexity2/54/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

No setup needed beyond cloning, the suite is plain JSON files you load into your own test runner.

No license information is mentioned in the README.

So what is it?

The JSON Schema Test Suite is a collection of standardized tests for checking whether a JSON Schema validator works correctly. JSON Schema is a way to describe what a valid JSON document should look like, which fields are required, what types they should be, and so on. If you're building a tool that checks JSON data against a schema, you want to be sure your tool gives the right answers. This suite provides a shared set of test cases so that anyone building a validator can verify their work against the same expectations. Each test case is a JSON file that contains a schema, some sample data, and a flag saying whether that data should pass or fail validation. For example, a test might define a schema requiring a string, then include one test where the data is a string (valid) and another where it's a number (invalid). The suite is organized by schema draft version, so you can test against the specific version of the JSON Schema spec you're targeting. It's written in plain JSON, so it works regardless of what programming language your validator is built in, you just need to load the files and run the checks yourself. This is primarily for developers building or maintaining JSON Schema validation libraries. The README lists dozens of validators across languages, JavaScript, Python, Go, Rust, Java, Ruby, and more, that already use the suite. If you're shipping a validator, running these tests gives you confidence you're handling edge cases correctly and matching the spec. The README notes that Draft 3 and Draft 4 have full coverage, and contributions are welcome if you spot gaps. The project is straightforward in its design: it's just data, not a framework or runner. You bring your own testing setup and interpret the JSON files yourself. That simplicity is the point, by staying language-agnostic, the same suite can serve the entire ecosystem of JSON Schema tools.

Copy-paste prompts

Prompt 1
Load all JSON Schema Test Suite test cases for Draft 2020-12 into my validator and report which ones pass and fail. Skip tests marked with the 'optional' format assertion flag.
Prompt 2
Write a test runner in Python that reads JSON Schema Test Suite files, feeds the embedded schema and data into my custom validator, and asserts the result matches the expected validity flag.
Prompt 3
Parse a JSON Schema Test Suite file and extract every test case into a table showing the schema description, sample data, and expected validation result so I can review the edge cases.

Frequently asked questions

What is json-schema-test-suite?

A shared collection of test cases in JSON format for checking whether a JSON Schema validator gives correct results. You load the files, run the checks yourself, and confirm your validator matches the spec.

What language is json-schema-test-suite written in?

Mainly Python. The stack also includes JSON, Python.

Is json-schema-test-suite actively maintained?

Dormant — no commits in 2+ years (last push 2022-06-30).

What license does json-schema-test-suite use?

No license information is mentioned in the README.

How hard is json-schema-test-suite to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is json-schema-test-suite for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.