All Projects β†’ hotkit β†’ json-schema

hotkit / json-schema

Licence: BSL-1.0 license
JSON schema validation

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to json-schema

Json Schema Org.github.io
JSON Schema website
Stars: ✭ 213 (+965%)
Mutual labels:  json-schema
Form Render
πŸš΄β€β™€οΈ ι˜Ώι‡Œι£žηŒͺ - εΎˆζ˜“η”¨ηš„δΈ­εŽε°γ€Œθ‘¨ε• / 葨格 / ε›Ύθ‘¨γ€θ§£ε†³ζ–Ήζ‘ˆ
Stars: ✭ 3,881 (+19305%)
Mutual labels:  json-schema
json matcher
Library for simplifying data verification in functional tests for your JSON-based APIs
Stars: ✭ 24 (+20%)
Mutual labels:  json-schema
Angular Schema Form
Generate forms from a JSON schema, with AngularJS!
Stars: ✭ 2,456 (+12180%)
Mutual labels:  json-schema
Json Schema Tools
Packages for working with JSON Schema and JSON Hyper-Schema
Stars: ✭ 232 (+1060%)
Mutual labels:  json-schema
Vue Form Json Schema
Create forms using JSON schema. Bring your components!
Stars: ✭ 253 (+1165%)
Mutual labels:  json-schema
Verify Json
verify-json
Stars: ✭ 208 (+940%)
Mutual labels:  json-schema
angular-schema-form-bootstrap
Bootstrap decorator for Angular Schema Form
Stars: ✭ 50 (+150%)
Mutual labels:  json-schema
Kubernetes Json Schema
A set of JSON schemas for various Kubernetes versions, extracted from the OpenAPI definitions
Stars: ✭ 234 (+1070%)
Mutual labels:  json-schema
json-kotlin-schema-codegen
Code generation for JSON Schema (Draft 07)
Stars: ✭ 52 (+160%)
Mutual labels:  json-schema
Activerecord json validator
πŸ”© ActiveRecord::JSONValidator makes it easy to validate JSON attributes against a JSON schema.
Stars: ✭ 220 (+1000%)
Mutual labels:  json-schema
Spot
Spot is a concise, developer-friendly way to describe your API contract.
Stars: ✭ 230 (+1050%)
Mutual labels:  json-schema
Rxdb
πŸ”„ A client side, offline-first, reactive database for JavaScript Applications
Stars: ✭ 16,670 (+83250%)
Mutual labels:  json-schema
Type O Rama
πŸ‘Ύ JS type systems interportability
Stars: ✭ 217 (+985%)
Mutual labels:  json-schema
openshift-json-schema
A set of JSON schemas for various OpenShift versions, extracted from the OpenAPI definitions
Stars: ✭ 23 (+15%)
Mutual labels:  json-schema
Vue Json Edit
Visual JSON editor built as an vue component. Provides a basic GUI
Stars: ✭ 207 (+935%)
Mutual labels:  json-schema
Full Stack Fastapi Couchbase
Full stack, modern web application generator. Using FastAPI, Couchbase as database, Docker, automatic HTTPS and more.
Stars: ✭ 243 (+1115%)
Mutual labels:  json-schema
restish
Restish is a CLI for interacting with REST-ish HTTP APIs with some nice features built-in
Stars: ✭ 453 (+2165%)
Mutual labels:  json-schema
another-json-schema
Another JSON Schema validator, simple & flexible & intuitive.
Stars: ✭ 48 (+140%)
Mutual labels:  json-schema
OpenAPI-Delphi
The Delphi-OpenAPI library is an OpenAPI 3.0 document generator and parser for Delphi
Stars: ✭ 79 (+295%)
Mutual labels:  json-schema

JSON Schema Validation

A JSON schema validator that builds on the JSON implementation found in fost-base and is built for use in Fostgres. It is implemented in modern C++, specifically C++17.

Assertions

The specifications for them are taken from JSON Schema Validation: A Vocabulary for Structural Validation of JSON (draft 1). All of described assertions are implemented:

  • allOf, anyOf and oneOf -- Values must conform to a specific number of the provided schemas.
  • const -- Values must be equal to the one in the schema.
  • contains -- At least one value in an array conforms to the schema.
  • dependencies -- Object property checks depending on which exist in the data.
  • enum -- Values must be in the specified set.
  • if, then and else -- conditional evaluation of schemas.
  • items and additionalItems-- Array items must confirm to the provided schemas.
  • maximum, minimum, exclusiveMaximum, exlusiveMinimum, multipleOf -- Value bounds checks for numeric data.
  • maxItems and minItems -- bounds for the number of items in a JSON array.
  • maxLength and minLength -- bounds for the number of code points in a string value.
  • maxProperties and minProperties -- counts for properties in a JSON object.
  • not -- negates the contained check.
  • pattern -- The regex must be found in a string value.
  • properties, patternProperties and additionalProperties -- that the assertions for each property hold if present in the JSON object data.
  • propertyNames -- names of object properties must conform to the provided schema.
  • required -- Object properties must include the specified strings.
  • type -- type check against the JSON types (null, boolean, object, array, number, string and integer).
  • uniqueItems -- All values in an array are unique.

The schema used for testing is http://json-schema.org/draft-07/schema#.

Notes

For type validation, if the underlying memory type is a double then it will only match against number even if there is no fractional part to the number. The JSON parser will correctly identify integers parsing JSON (and use the int64_t memory type for them), so this can only happen when JSON is produced by code that uses a double. The memory type int64_t will match both of the number and integer validation types.

The handling of $id is particularly nasty. Although this implementation passes the test suite there are a large number of edge cases with the interactions between $ref and $id that are not tested or covered. Our recommendation is to avoid use of $id except for a full URL at schema root if required.

The JSON Schema Testsuite

The build target json-schema-testsuite will download and run the tests that are found at the JSON Schema Test Suite.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].