Skip to content

pascalPost/json-schema-validator

Repository files navigation

json-schema-validator

Testing Status

A JSON Schema validator implementation written in Zig, following the Two-Argument Validation interface specification.

Overview

This project aims to provide a robust JSON Schema validation solution implemented in Zig for the Zig ecosystem. It currently supports various JSON Schema draft-07 validation features and is actively being developed to support more.

Dependencies

  • Zig compiler
  • C++ Standard Library (for regex support)

Implementation Details

The validator currently uses C++ regex implementation for pattern matching, requiring linkage against the C++ standard library.

Features Implementation Status

  • draft-07 tests
    • additionalItems.json
    • additionalProperties.json
    • allOf.json
    • anyOf.json
    • boolean_schema.json
    • const.json
    • contains.json
    • default.json
    • definitions.json
    • dependencies.json
    • enum.json
    • exclusiveMaximum.json
    • exclusiveMinimum.json
    • format.json
    • if-then-else.json
    • infinite-loop-detection.json
    • items.json
    • maxItems.json
    • maxLength.json
    • maxProperties.json
    • maximum.json
    • minItems.json
    • minLength.json
    • minProperties.json
    • minimum.json
    • multipleOf.json
    • not.json
    • oneOf.json
    • pattern.json
    • patternProperties.json
    • properties.json
    • propertyNames.json
    • ref.json
    • refRemote.json
    • required.json
    • type.json
    • uniqueItems.json

Feature ideas

  • add option to set defaults (for a schema validation defaults are just annotations.)

Contributing

Contributions are welcome! Feel free to submit pull requests, especially for implementing pending features.

About

JSON schema validator for Zig

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published