All Projects → Julian → Jsonschema

Julian / Jsonschema

Licence: mit
An implementation of the JSON Schema specification for Python

Programming Languages

python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Jsonschema

Swagger Parser
Swagger 2.0 and OpenAPI 3.0 parser/validator
Stars: ✭ 710 (-79.56%)
Mutual labels:  validation, json-schema, openapi
openapi-schemas
JSON Schemas for every version of the OpenAPI Specification
Stars: ✭ 22 (-99.37%)
Mutual labels:  validation, json-schema, openapi
openapi-schema-validator
OpenAPI schema validator for Python
Stars: ✭ 35 (-98.99%)
Mutual labels:  schema, validation, openapi
arrest
Swagger REST framework for Node.js, with support for MongoDB and JSON-Schema
Stars: ✭ 17 (-99.51%)
Mutual labels:  schema, openapi, jsonschema
fform
Flexibile and extendable form builder with constructor
Stars: ✭ 26 (-99.25%)
Mutual labels:  schema, json-schema, jsonschema
openapi4j
OpenAPI 3 parser, JSON schema and request validator.
Stars: ✭ 92 (-97.35%)
Mutual labels:  schema, json-schema, openapi
home
This is the home page for the API specification toolbox.
Stars: ✭ 16 (-99.54%)
Mutual labels:  json-schema, openapi
flaskerk
A flask extension for api doc and validation of request&response.
Stars: ✭ 24 (-99.31%)
Mutual labels:  validation, openapi
thema
A CUE-based framework for portable, evolvable schema
Stars: ✭ 41 (-98.82%)
Mutual labels:  schema, openapi
i18n-tag-schema
Generates a json schema for all i18n tagged template literals in your project
Stars: ✭ 15 (-99.57%)
Mutual labels:  validation, json-schema
svelte-form
JSON Schema form for Svelte v3
Stars: ✭ 47 (-98.65%)
Mutual labels:  validation, json-schema
bluepine
A DSL for defining API schemas/endpoints, validating, serializing and generating Open API v3
Stars: ✭ 21 (-99.4%)
Mutual labels:  schema, openapi
schema-shot
Framework-agnostic snapshot testing using "schema by example" for highly dynamic data
Stars: ✭ 34 (-99.02%)
Mutual labels:  schema, json-schema
Structure
A simple schema/attributes library built on top of modern JavaScript
Stars: ✭ 292 (-91.59%)
Mutual labels:  schema, validation
fhir-fuel.github.io
Place to prepare proposal to FHIR about JSON, JSON-Schema, Swagger/OpenAPI, JSON native databases and other JSON-frendly formats (yaml, edn, avro, protobuf etc) and technologies
Stars: ✭ 20 (-99.42%)
Mutual labels:  json-schema, openapi
openapi-lint-vscode
OpenAPI 2.0/3.0.x intellisense, validator, linter, converter and resolver extension for Visual Studio Code
Stars: ✭ 47 (-98.65%)
Mutual labels:  validation, openapi
json-ref-resolver
[Deprecated] Recursively resolve JSON pointers and remote authorities.
Stars: ✭ 27 (-99.22%)
Mutual labels:  json-schema, openapi
modelina
Library for generating data models based on inputs such as AsyncAPI, OpenAPI, or JSON Schema documents.
Stars: ✭ 55 (-98.42%)
Mutual labels:  json-schema, openapi
Php Openapi
Read and write OpenAPI yaml/json files and make the content accessible in PHP objects.
Stars: ✭ 268 (-92.29%)
Mutual labels:  schema, openapi
php-json-schema-model-generator
Creates (immutable) PHP model classes from JSON-Schema files including all validation rules as PHP code
Stars: ✭ 36 (-98.96%)
Mutual labels:  json-schema, openapi

jsonschema

PyPI version Supported Python versions Build status ReadTheDocs status pre-commit.ci status Zenodo

jsonschema is an implementation of the JSON Schema specification for Python.

>>> from jsonschema import validate

>>> # A sample schema, like what we'd get from json.load()
>>> schema = {
...     "type" : "object",
...     "properties" : {
...         "price" : {"type" : "number"},
...         "name" : {"type" : "string"},
...     },
... }

>>> # If no exception is raised by validate(), the instance is valid.
>>> validate(instance={"name" : "Eggs", "price" : 34.99}, schema=schema)

>>> validate(
...     instance={"name" : "Eggs", "price" : "Invalid"}, schema=schema,
... )                                   # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
    ...
ValidationError: 'Invalid' is not of type 'number'

It can also be used from console:

$ jsonschema --instance sample.json sample.schema

Features

Installation

jsonschema is available on PyPI. You can install using pip:

$ pip install jsonschema

Running the Test Suite

If you have tox installed (perhaps via pip install tox or your package manager), running tox in the directory of your source checkout will run jsonschema's test suite on all of the versions of Python jsonschema supports. If you don't have all of the versions that jsonschema is tested under, you'll likely want to run using tox's --skip-missing-interpreters option.

Of course you're also free to just run the tests on a single version with your favorite test runner. The tests live in the jsonschema.tests package.

Benchmarks

jsonschema's benchmarks make use of pyperf. Running them can be done via:

$ tox -e perf

Community

The JSON Schema specification has a Slack, with an invite link on its home page. Many folks knowledgeable on authoring schemas can be found there.

Otherwise, asking questions on Stack Overflow is another means of getting help if you're stuck.

Contributing

I'm Julian Berman.

jsonschema is on GitHub.

Get in touch, via GitHub or otherwise, if you've got something to contribute, it'd be most welcome!

You can also generally find me on Libera (nick: Julian) in various channels, including #python.

If you feel overwhelmingly grateful, you can also sponsor me.

And for companies who appreciate jsonschema and its continued support and growth, jsonschema is also now supportable via TideLift.

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].