Skip to main content

A lightweight and efficient JSON validation tool for Python.

Project description

Project description

JSONEyeX is a Python package that provides an easy-to-use and robust solution for validating JSON data against a predefined schema. Designed to handle various data types and structures, including nested JSON objects, JSONEyeX ensures your data adheres to the specified format and types, enhancing the reliability of your applications that process JSON data.

Features:

  • Validates standard JSON data types, including strings, numbers, objects, and lists.
  • Supports custom validation for nested JSON structures.
  • Provides clear, descriptive error messages for quick debugging.
  • Easy integration into existing Python projects.

Ideal for:

  • Data validation in web APIs.
  • Ensuring data integrity in data processing pipelines.
  • Rapid development in scenarios where JSON data structures are extensively used.

JSONEyeX is simple yet powerful, making it an essential tool for any project that requires JSON data validation.

Example Usage:

Here is a simple example demonstrating how to use JSONEyeX to validate a JSON object:

Datatype Map

This datatype can be used

    {
        "string": str,
        "number": (int, float),
        "object": dict,
        "list": list
    }
schema = {
    "type": "object",
    "properties": {
        "name": {"type": "string"},
        "age": {"type": "number"},
        "address": {
            "type": "object",
            "properties": {
                "street": {"type": "string"},
                "city": {"type": "string"}
            },
            "required": ["street", "city"]
        }
    },
    "required": ["name", "age", "address"]
}

data = {
    "name": "John Doe",
    "age": 30,
    "address": {
        "street": "123 Main St",
        "city": "Anytown"
    }
}

from JSONEyeX import jsonvalidator

try:
    validator = jsonvalidator(schema, data)
    print("No errors, validation successful.")
except ValueError as e:
    print(f"Validation error: {e}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

JSONEyeX-0.0.8.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

JSONEyeX-0.0.8-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file JSONEyeX-0.0.8.tar.gz.

File metadata

  • Download URL: JSONEyeX-0.0.8.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for JSONEyeX-0.0.8.tar.gz
Algorithm Hash digest
SHA256 b2abb08bfec9ae67a58811ae7b6c853c0d8d0dba4768751befb3c24f61b0706d
MD5 ca58afc9c6e6d76642fa115ab9531630
BLAKE2b-256 bc08eac58c72d7d892f24bc64f5c904437b74aaccf00e9b6ed67fe1ce785352c

See more details on using hashes here.

File details

Details for the file JSONEyeX-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: JSONEyeX-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for JSONEyeX-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3900525a8abfe4053888c73e51b5791e002502407e4b911d3e2cc8443e9f8bd2
MD5 ac4b1b44a1cb2b0946533b0181e2c68f
BLAKE2b-256 75f3ba0789ff075c619805784ddd2f91c680601c3efb79868552c30801c76edf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page