semvec/pypi-packages huggingface dataset:
sphinx-json-schema-spec 2025.1.1
Sphinx support for the JSON Schema specifications
Requires Python: >=3.11
Keywords: data validation, json, json schema, jsonschema, sphinx

===========================
``sphinx-json-schema-spec``
===========================

|PyPI| |Pythons| |CI|

.. |PyPI| image:: https://img.shields.io/pypi/v/sphinx-json-schema-spec.svg
  :alt: PyPI version
  :target: https://pypi.org/project/sphinx-json-schema-spec/

.. |Pythons| image:: https://img.shields.io/pypi/pyversions/sphinx-json-schema-spec.svg
  :alt: Supported Python versions
  :target: https://pypi.org/project/sphinx-json-schema-spec/

.. |CI| image:: https://github.com/python-jsonschema/sphinx-json-schema-spec/workflows/CI/badge.svg
  :alt: Build status
  :target: https://github.com/python-jsonschema/sphinx-json-schema-spec/actions?query=workflow%3ACI


A Sphinx extension providing a role which allows linking to sections within the `JSON Schema specifications <https://json-schema.org/>`_.

It is intended for use by implementations of JSON Schema (in Python or otherwise) who may wish to interlink to the specification in their own documentation.
jsonschema-lexer 0.3.0
A Pygments lexer for JSON Schema
Requires Python: >=3.10
Keywords: json, jsonschema

=======================
``jsonschema-lexer``
=======================

|PyPI| |Pythons| |CI|

.. |PyPI| image:: https://img.shields.io/pypi/v/jsonschema-lexer.svg
  :alt: PyPI version
  :target: https://pypi.org/project/jsonschema-lexer/

.. |Pythons| image:: https://img.shields.io/pypi/pyversions/jsonschema-lexer.svg
  :alt: Supported Python versions
  :target: https://pypi.org/project/jsonschema-lexer/

.. |CI| image:: https://github.com/python-jsonschema/jsonschema-lexer/workflows/CI/badge.svg
  :alt: Build status
  :target: https://github.com/python-jsonschema/jsonschema-lexer/actions?query=workflow%3ACI

Introduction
------------

`jsonschema-lexer` provides a lexer for syntax highlighting JSON Schema documents via `Pygments <https://pygments.org/>`_.

Usage
-----

Once installed, you can use it in your Python code to highlight JSON Schema documents.

Here's a simple example:

.. code-block:: python

  from jsonschema_lexer import JSONSchemaLexer

  from rich.console import Console
  from rich.syntax import Syntax

  console = Console()

  code = """
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://example.com/product.schema.json",
    "title": "Product",
    "description": "A product from Acme's catalog",
    "type": "object",
    "properties": {
      "productId": {
        "description": "The unique identifier for a product",
        "type": "integer"
      },
      "productName": {
        "description": "Name of the product",
        "type": "string"
      }
    }
  }
  """

  syntax = Syntax(code, lexer=JSONSchemaLexer(), background_color="default", word_wrap=True)
  console.print(syntax)