{"id":20013750,"url":"https://github.com/gregorybchris/jsonvl","last_synced_at":"2025-05-04T21:32:12.134Z","repository":{"id":62572984,"uuid":"339023277","full_name":"gregorybchris/jsonvl","owner":"gregorybchris","description":"Schema validation for JSON in Python","archived":false,"fork":false,"pushed_at":"2021-12-17T03:28:55.000Z","size":203,"stargazers_count":5,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T18:04:18.826Z","etag":null,"topics":["json","json-validation","python","schema","validation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregorybchris.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-15T09:19:40.000Z","updated_at":"2022-09-06T16:38:08.000Z","dependencies_parsed_at":"2022-11-03T18:26:45.919Z","dependency_job_id":null,"html_url":"https://github.com/gregorybchris/jsonvl","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorybchris%2Fjsonvl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorybchris%2Fjsonvl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorybchris%2Fjsonvl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorybchris%2Fjsonvl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregorybchris","download_url":"https://codeload.github.com/gregorybchris/jsonvl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252404380,"owners_count":21742542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","json-validation","python","schema","validation"],"created_at":"2024-11-13T07:37:45.235Z","updated_at":"2025-05-04T21:32:10.572Z","avatar_url":"https://github.com/gregorybchris.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JsonVL\n\n[![GitHub CI](https://github.com/gregorybchris/jsonvl/workflows/JsonVL-CI/badge.svg?branch=main)](https://github.com/gregorybchris/jsonvl/actions?query=workflow%3AJsonVL-CI)\n[![codecov](https://codecov.io/gh/gregorybchris/jsonvl/branch/main/graph/badge.svg?token=S8VQAMZ2OP)](https://codecov.io/gh/gregorybchris/jsonvl)\n\nJsonVL is a JSON validator for Python. This project is intended to be a replacement for the [jsonschema package](https://pypi.org/project/jsonschema/) which implements the [JSON Schema standard](https://json-schema.org/). JsonVL's goal is to curate a rich set of validation methods for JSON data types while remaining extensible to new constraints.\n\n## Installation\n\nInstall the latest [PyPI release](https://pypi.org/project/jsonv/):\n\n```bash\npip install jsonvl\n```\n\n## Usage\n\n### Validate JSON files from the command line\n\n```bash\njsonvl data.json schema.json\n```\n\n### Validate JSON files in Python\n\n```python\nfrom jsonvl import validate_file\n\nvalidate_file('data.json', 'schema.json')\n```\n\n### Validate in-memory JSON data in Python\n\n```python\nfrom jsonvl import validate\n\nvalidate(data, schema)\n```\n\n## Documentation\n\nThe JsonVL documentation is hosted by [Read the Docs](https://jsonvl.readthedocs.io) and is a work in progress.\n\n## Example\n\nBelow is an example pair of JSON data and JSON schema. More examples can be found in the [examples](https://github.com/gregorybchris/jsonvl/tree/main/examples) folder.\n\n### Data\n\n```json\n{\n  \"play\": \"A Midsummer Night's Dream\",\n  \"characters\": [\n    { \"name\": \"Helena\", \"loves\": [\"Demitrius\"] },\n    { \"name\": \"Demitrius\", \"loves\": [\"Hermia\", \"Helena\"] },\n    { \"name\": \"Hermia\", \"loves\": [\"Lysander\"] },\n    { \"name\": \"Lysander\", \"loves\": [\"Hermia\", \"Helena\", \"Hermia\"] },\n    { \"name\": \"Titania\", \"loves\": [\"Oberon\", \"Bottom\", \"Oberon\"] },\n    { \"name\": \"Oberon\", \"loves\": [\"Titania\"] },\n    { \"name\": \"Bottom\", \"loves\": [] },\n    { \"name\": \"Puck\", \"loves\": [] }\n  ]\n}\n```\n\n### Schema\n\n```json\n{\n  \"type\": \"object\",\n  \"attr\": {\n    \"play\": \"string\",\n    \"characters\": {\n      \"type\": \"array\",\n      \"cons\": {\n        \"unique\": \"@all.name\"\n      },\n      \"elem\": {\n        \"type\": \"object\",\n        \"attr\": {\n          \"name\": \"#name\",\n          \"loves\": {\n            \"type\": \"array\",\n            \"elem\": \"#name\",\n            \"cons\": { \"max_size\": 4 }\n          }\n        }\n      }\n    }\n  },\n  \"defs\": {\n    \"#name\": {\n      \"type\": \"string\",\n      \"cons\": {\n        \"format\": { \"type\": \"regex\", \"pattern\": \"[A-Z][a-z]{0,10}\" }\n      }\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorybchris%2Fjsonvl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregorybchris%2Fjsonvl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorybchris%2Fjsonvl/lists"}