{"id":21806356,"url":"https://github.com/sejalmankar1012/json_validator","last_synced_at":"2026-05-16T20:33:07.347Z","repository":{"id":193336704,"uuid":"688600394","full_name":"sejalmankar1012/Json_Validator","owner":"sejalmankar1012","description":"This project provides a Python tool for JSON data validation against user-defined schemas, ensuring data conformity to specific rules and structures. It offers features such as checking required fields, enforcing field value constraints, and validating data integrity.","archived":false,"fork":false,"pushed_at":"2023-09-07T18:06:50.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T04:27:45.091Z","etag":null,"topics":["data-validation","docstrings","error-handling","json-schema","jsondata","pep8","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sejalmankar1012.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-07T17:29:57.000Z","updated_at":"2023-09-07T18:10:24.000Z","dependencies_parsed_at":"2023-09-07T20:09:19.541Z","dependency_job_id":null,"html_url":"https://github.com/sejalmankar1012/Json_Validator","commit_stats":null,"previous_names":["sejalmankar1012/json_validator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sejalmankar1012%2FJson_Validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sejalmankar1012%2FJson_Validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sejalmankar1012%2FJson_Validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sejalmankar1012%2FJson_Validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sejalmankar1012","download_url":"https://codeload.github.com/sejalmankar1012/Json_Validator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244759899,"owners_count":20505712,"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":["data-validation","docstrings","error-handling","json-schema","jsondata","pep8","python"],"created_at":"2024-11-27T12:19:10.418Z","updated_at":"2026-05-16T20:33:02.321Z","avatar_url":"https://github.com/sejalmankar1012.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# JSON Validation Project\n\nThis project provides a Python tool for validating JSON data against a specified schema. It includes a `JsonValidator` class that can check for various schema rules, such as required fields, field values, and more.\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Project Structure](#project-structure)\n- [Contributing](#contributing)\n\n## Features\n\nThe `JsonValidator` class in this project supports the following schema validation features:\n\n1. Required fields: Ensure that specific fields in the JSON data are mandatory.\n2. At least one of many fields: Check that at least one of a set of fields is present in the JSON data.\n3. Either one field or another field: Validate that either one field or another field (mutually exclusive) is present in the JSON data.\n4. Mutually exclusive fields: Ensure that if one field is present, another field should not be present.\n5. Field value to be one of a set of values: Validate that a field's value matches one of a predefined set of values (enum).\n\n## Installation\n\nTo use this JSON validation tool, follow these steps:\n\n1. Clone this GitHub repository:\n\n   ```shell\n   git clone https://github.com/yourusername/json-validation-project.git\n   ```\n\n2. Change to the project directory:\n\n   ```shell\n   cd json-validation-project\n   ```\n\n3. (Optional) Create and activate a virtual environment:\n\n   ```shell\n   python -m venv venv\n   source venv/bin/activate   # On Windows, use: venv\\Scripts\\activate\n   ```\n\n4. Install the required dependencies:\n\n   ```shell\n   pip install -r requirements.txt\n   ```\n\n## Usage\n\nTo use the JSON validation tool, you can create an instance of the `JsonValidator` class and call the `validate_schema` method. Here's an example:\n\n```python\nfrom json_validator import JsonValidator\n\n# Create an instance of the JsonValidator class\nvalidator = JsonValidator(schema_file=\"path/to/schema.json\", schema_integrity_file=\"path/to/schema_integrity.json\")\n\n# JSON data to be validated (provide the path to your JSON data file)\njson_file_to_validate = \"path/to/your/data.json\"\n\n# Validate the JSON data against the schema\nis_valid = validator.validate_schema(json_file_to_validate)\n\nif is_valid:\n    print(\"Validation succeeded. The JSON data is valid.\")\nelse:\n    print(\"Validation failed. The JSON data is not valid.\")\n```\n\nReplace `\"/schema.json\"`, and `\"/data.json\"` with the actual file paths and JSON data you want to validate.\n\n## Project Structure\n\nThe project directory structure is organized as follows:\n\n- `json_validator.py`: The Python script containing the `JsonValidator` class.\n- `validation_script.py`: An example script demonstrating how to use the `JsonValidator` class.\n- `data/`: Directory containing JSON data files for validation.\n- `README.md`: This README file.\n\n\n## Contributing\n\nContributions to this project are welcome! If you have suggestions or want to report issues, please open an [issue](https://github.com/sejalmankar1012/json-validation-project/issues) or submit a [pull request](https://github.com/sejalmakar1012/json-validation-project/pulls).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsejalmankar1012%2Fjson_validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsejalmankar1012%2Fjson_validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsejalmankar1012%2Fjson_validator/lists"}