https://github.com/pascalpost/json-schema-validator
JSON schema validator for Zig
https://github.com/pascalpost/json-schema-validator
json-schema jsonschema validation validator zig ziglang
Last synced: 3 months ago
JSON representation
JSON schema validator for Zig
- Host: GitHub
- URL: https://github.com/pascalpost/json-schema-validator
- Owner: pascalPost
- License: mit
- Created: 2024-10-04T07:55:48.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-01-23T19:49:24.000Z (4 months ago)
- Last Synced: 2025-01-23T20:30:08.261Z (4 months ago)
- Topics: json-schema, jsonschema, validation, validator, zig, ziglang
- Language: Zig
- Homepage:
- Size: 116 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# json-schema-validator

A JSON Schema validator implementation written in Zig, following the [Two-Argument Validation](https://json-schema.org/implementers/interfaces#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
- [x] additionalItems.json
- [x] additionalProperties.json
- [x] allOf.json
- [x] anyOf.json
- [x] boolean_schema.json
- [x] const.json
- [x] contains.json
- [x] default.json
- [ ] definitions.json
- [x] dependencies.json
- [x] enum.json
- [x] exclusiveMaximum.json
- [x] exclusiveMinimum.json
- [x] format.json
- [x] if-then-else.json
- [ ] infinite-loop-detection.json
- [x] items.json
- [x] maxItems.json
- [x] maxLength.json
- [x] maxProperties.json
- [x] maximum.json
- [x] minItems.json
- [x] minLength.json
- [x] minProperties.json
- [x] minimum.json
- [x] multipleOf.json
- [x] not.json
- [x] oneOf.json
- [x] pattern.json
- [x] patternProperties.json
- [x] properties.json
- [x] propertyNames.json
- [ ] ref.json
- [ ] refRemote.json
- [x] required.json
- [x] type.json
- [x] 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.