Skip to main content

No project description provided

Project description

jsoncompat

JSON Schema Compatibility Checker Python Bindings

Check compatibility of evolving JSON schemas and generate example values using Python.

Installation

Install from PyPI:

pip install jsoncompat

Usage

import jsoncompat as jsc

# Define old and new schemas as JSON strings
old_schema = '{"type": "string"}'
new_schema = '{"type": "number"}'

# Check compatibility (role: "serializer", "deserializer", or "both")
is_compatible = jsc.check_compat(old_schema, new_schema, "both")
print(is_compatible)

# Generate an example value for a schema
example = jsc.generate_value(old_schema, depth=5)
print(example)

API Reference

  • check_compat(old_schema_json: str, new_schema_json: str, role: str = "both") -> bool
  • generate_value(schema_json: str, depth: int = 5) -> str

Examples

See the basic demo for a complete end-to-end script.

License

MIT License. See LICENSE.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

jsoncompat-0.1.6a4-cp313-cp313-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.13Windows x86-64

jsoncompat-0.1.6a4-cp313-cp313-win32.whl (1.2 MB view details)

Uploaded CPython 3.13Windows x86

jsoncompat-0.1.6a4-cp313-cp313-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

jsoncompat-0.1.6a4-cp313-cp313-musllinux_1_2_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

jsoncompat-0.1.6a4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

jsoncompat-0.1.6a4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

jsoncompat-0.1.6a4-cp313-cp313-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

jsoncompat-0.1.6a4-cp313-cp313-macosx_10_12_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

jsoncompat-0.1.6a4-cp312-cp312-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.12Windows x86-64

jsoncompat-0.1.6a4-cp312-cp312-win32.whl (1.2 MB view details)

Uploaded CPython 3.12Windows x86

jsoncompat-0.1.6a4-cp312-cp312-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

jsoncompat-0.1.6a4-cp312-cp312-musllinux_1_2_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

jsoncompat-0.1.6a4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

jsoncompat-0.1.6a4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

jsoncompat-0.1.6a4-cp312-cp312-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

jsoncompat-0.1.6a4-cp312-cp312-macosx_10_12_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

jsoncompat-0.1.6a4-cp311-cp311-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.11Windows x86-64

jsoncompat-0.1.6a4-cp311-cp311-win32.whl (1.2 MB view details)

Uploaded CPython 3.11Windows x86

jsoncompat-0.1.6a4-cp311-cp311-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

jsoncompat-0.1.6a4-cp311-cp311-musllinux_1_2_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

jsoncompat-0.1.6a4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

jsoncompat-0.1.6a4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

jsoncompat-0.1.6a4-cp311-cp311-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

jsoncompat-0.1.6a4-cp311-cp311-macosx_10_12_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

Details for the file jsoncompat-0.1.6a4-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e48bdc6d0e72bc51ce52c3379d5f0008a7ee3f507e7f22a5b285b19f16097d3d
MD5 e25137276fea608c8b7ad4fbfa1419f6
BLAKE2b-256 b7ecfcf453c54accdef1bad064b379fd521798fb766806472de2dbfece1a437e

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp313-cp313-win32.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 18f7f56f20715dceeb7c868dffee72c574318fae53ad6f4f2f8bdeda6a11e85a
MD5 3a181bbc9265fbfb7917e4082dad38c7
BLAKE2b-256 3c9071c5a1af10e1df33c581b5a255f7a55eb80fdb273deb9a2091f8762b8908

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2deccecdc9636d47f926583199a4812a8b5181350ac947ad92283c32c045229a
MD5 8b99913b6e83e1281e4ba53d463b2fa3
BLAKE2b-256 64c8de9d324be3f2e2f47dd2ac3fbbd7c1e1b41f2aa8e88cc815d5abf313f6eb

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp313-cp313-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 94631bfdf488a44a41810e217242ca6f3cfc984752b737173af0a621f0bd0878
MD5 600d7b58640715aec17d1b5c9e5df69a
BLAKE2b-256 b89756b550a37ab50bb47ab94625f4280cbd439a33fe71b8c05cafcb94f10465

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b8de51c28749654b69f0c4e9b076bcb11277093b188c6763c8d945c2720d96a1
MD5 d737104e036f0ef0e170f1c893c3a420
BLAKE2b-256 a69417220d67a20f3da57d94adc459c9019082e59f5cfe84f09de8d670940510

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a5c24a2c5f41fa1ceff8658eaa5bd074385d7b09d932f8a6bdda51ee2aee7efc
MD5 d07db967c060d0404d2a1cc849db0699
BLAKE2b-256 1b770ea8f6025e16e31150f74197068931abd8399f0b658d54d10de4a0431ce9

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 92e02571d34164d2e0bc93712c0ba5819050014bfa358f0e6e5ea9dd48b5d020
MD5 f045daba5c42d83c650483a6db851cc3
BLAKE2b-256 c4f78c8a65907536bf9d05554a52445041d9593a073a4505ea1d09abadcf5d6e

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 615bdfefb51b101e37464592d00e3f5165e03e889d0690f38cd2612fa400134d
MD5 df974f028c428b362299d3d238e9ac6b
BLAKE2b-256 9d6a4c01cef9fdf3f65caefa9beb33f18c4ac509a804618f3a7cb726818f9454

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8a94ce9c84607426f507cdb228ca3bbb1078c639503c649e1a84f924455dcf88
MD5 127bd18186d634c4f929377599b567b4
BLAKE2b-256 9124c33b60c5a7e786a152b19c8bcbc86c30ee8f7cf4b40c568527604d81a612

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp312-cp312-win32.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 0f30889c410b2ed66b277c313fefc8b6473698940b3765b858449878d88adb6a
MD5 66da736a4bcdfaa3cb0f27937a57dca0
BLAKE2b-256 750225d2851e30eb9fb530f7bfa92c7d90930ebb2737563f5f5ceb88853b570a

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a047ea0eab4a8a24b10256fa75ae700fb9fcc42ce8621020f3dec0ac667f3f7e
MD5 fddff6699d83664cabf17a7ede4ca5bb
BLAKE2b-256 b5ac3e829668b0cadd9f081381a138f580443b2414124afe47ea97b3bb0e8016

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp312-cp312-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 a24241950452ac518eff3ed4261ed095d9525f73ce8d49392c570f7bf8a394c6
MD5 9e78d1e2ee8e3aeb652d86a732e14a4c
BLAKE2b-256 fe52fcf20620852a9e46bf455bed03f90559bd6b38129867931be69bafdeed86

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b0e67e01d5ac0fad4443f0b8479743c10fb39961f4b3cb4adbf74d3b54defb20
MD5 16e6ced9bc0a9a29b204a7957b14637b
BLAKE2b-256 d8bc26c34c2bf7c3bca822b0f2d0498a3881177a60f78902da4e70b0ebc677c5

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bad6e9ec50051e31be611254543a5f3c81f1c0e7f94f2c090e47439788c6eef3
MD5 111d4b4e799c61f65f63c0a466fa7040
BLAKE2b-256 7c2bb171175e448fe2f65b1dad31a7272f53848ff336456d7b05293d1e127dcd

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f74f0ae72d28391be43cd94e70bee575c81b098d2c0138d591766aea700eee80
MD5 6cfa2324822673355a161cf8392f5eaf
BLAKE2b-256 b7df622f87658e2aef37e65fcf2816ea24b6abd572a55292fe0a70d00a3f02ed

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c257dfeeb98f8914d6b541c1952baa8cdfbbaba2e45f25e22885238bb4ff6057
MD5 6a228d039a7f24414df7c44eeb597d3d
BLAKE2b-256 4dd71969684a94f1b122d1feb2790a33e5fbbcf0a5f8af304257bd049e8626cc

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9c131c62bc801be6a858f8b39a39b1d0d0391f23ab5597acdcc1ad72e069c275
MD5 0bdc5b763ed50fd29aabcb152deab85b
BLAKE2b-256 df5c1d2f5360e403c60717de2e49a463dafd3a1150750d356d03dd6398a470b9

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp311-cp311-win32.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 20dc130fb93195fde266279312eba0bb8e2914bee6c3121038dd49a41a944231
MD5 6f7e217ac9cda348b50634159f6f45ff
BLAKE2b-256 2111dde52b35daaa142a6f69fbe8ab6eca6a55626cda9b52bc5da8d1a55bd9b7

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 267d797f0ec1a9c9c950e450796778e19654cf815c5eec5033f7b6d70e116126
MD5 da8fdfda5d4f6461955699a40cb04fb2
BLAKE2b-256 8f105256f29673c3e28cfdeadd6ebeb6a730e248417ad46bdda0a407f4c1c4a3

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp311-cp311-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 2b4459f7438a508e49be5defd80a88898bebf26b6463cdf2a9573ed2a7a97ba1
MD5 c05ae29d6008483975697747c219a651
BLAKE2b-256 01d26d9743b1732b3d2179fbb5cd136cec29720c60b2c34ba1da7d95b179081c

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 45b349d09e15df1a1c1fb68e1d56a2ad2d4d14c27a19bd9e9b35dce560e00864
MD5 82baa74d5e2ea972d900deec844e88a9
BLAKE2b-256 7c4357ff5ca07ea1da584198e037b93c783982056e11cc254c04cd68fdcadc71

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 adb7636c0b3d893cdd631731778e1dafdc6bda2bec6341d19bacdbaf7d1eade8
MD5 51ab7a1867336cf8a8cd5b37c59153cc
BLAKE2b-256 ea18b94d8ccdbb6a02b7b385c7efaf1f157547ff0ce129980cd373b62532ba92

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d0a509edf4cdbe0ea99f5811ddeb887ea8b810fa9d932e7377dd65325a76e4fb
MD5 6531d31964d4c2ba5f482c82c7d835cf
BLAKE2b-256 2d33a09536f19e338b2f92610eddd11c42a8c41319ebe9d0b3cfc34948dd5a46

See more details on using hashes here.

File details

Details for the file jsoncompat-0.1.6a4-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a4-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e488bf824186f98e0c030e7bc60995db9718b0d6b36f77cc60fb5faa1ac50bf0
MD5 94b393e2e692b3714d0b9f66e00fa622
BLAKE2b-256 f0d2959a5707f207b5ddeb77dc75bf9acce30e17caee3d5eadfbcef1f05e3ddc

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