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.6a5-cp313-cp313-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13Windows x86

jsoncompat-0.1.6a5-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.6a5-cp313-cp313-musllinux_1_2_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

jsoncompat-0.1.6a5-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.6a5-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.6a5-cp313-cp313-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12Windows x86

jsoncompat-0.1.6a5-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.6a5-cp312-cp312-musllinux_1_2_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

jsoncompat-0.1.6a5-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.6a5-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.6a5-cp312-cp312-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11Windows x86

jsoncompat-0.1.6a5-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.6a5-cp311-cp311-musllinux_1_2_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

jsoncompat-0.1.6a5-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.6a5-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.6a5-cp311-cp311-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

jsoncompat-0.1.6a5-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.6a5-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9770a3c799c75960691387be71d6947a68ec69109a9f12ec1c5e6b78cb7b137e
MD5 cdd547a4da077e097b3f521b3c69aef7
BLAKE2b-256 b55bf5aa141a0a5120d9e57567336f4a0739a2c5aeae02267022eb9de7fc9a01

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 42e31f1781bcdf2d8d285c33a23d2ac516b54b890352158b78093df8ccc0c120
MD5 ae2ec94147ce20716e1c893791237fa5
BLAKE2b-256 a034ce07c89b2256fbb46ca7092284d986aa142200ac197bbea1bd28959a7e1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c2dab53b0d8802d8a6edf3978690cf798264aaf218aa9b27b7495fbf04aab14d
MD5 ce89b5f455d6b615eefdce942ee3fed4
BLAKE2b-256 163adb43d199acb955242095b349ba8498142cc6cd0e2353a28784de5b91a6b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 f1db20f60fa7da60f36ec4f882d289b54bff8a8a5a4b50f61f3f7c1a5062c6ea
MD5 dc3c68a13a78ce720247038b7ed03ee3
BLAKE2b-256 3e3d86be495571d5c2772a4d332a28d62ac9b0cdf7ff00fd4fd82774b3758ab6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 da87a7495382d1b2a65477ddf871f623534c1d97b212ab1909cd12816ecd0432
MD5 8ecd4dec3f5027a60815ed2f72412253
BLAKE2b-256 20a2aaeb79915f2e33ea7c1a28cfe2d973446833af040f8f7562ef598e055299

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 28587f86f43de52cc12c1ba9e9c4b5823c9d48027cbf44ae40f7f421432d4edc
MD5 4c8a0ee784173aa52361778a5805bf97
BLAKE2b-256 0ddcf832e16bee98547de88884f9c9cd1668c3625d7d206f6477582ce42ba3d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d9e0243905cc1e313a4c5784c2489cf06af465ded400442b93f68dba88c119f9
MD5 3f46598c12a21242e372bb684f6d26b2
BLAKE2b-256 b6447ad6042210efb3790b2102af4c80d5f971b701482113cf9369150d5f1dec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 962bb434b5e80a2a9c68a1995808cae61dde40eca05e9a09ae13fbcc35bb77bb
MD5 a48ec8e47f60420ab1f20c8bed424d05
BLAKE2b-256 1281acd1295afa60e44d00e7ac27753c5913eb33f2359d33c300d151ae6b2c78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 20ccdcf030516d7d0b5948e2f53cbd6c0b7887a9fadca7ebb626a47ede7023ab
MD5 080f5fe9e68684e6f592ef6bfb05977b
BLAKE2b-256 6ffa0cfea1369a0fc26371cc49b9dcebad6bcbe1ac40d3a13071ca0038ed4ac0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 d925e59f306657f638dc38c8792c752b8c46dbf11cdc49e48edcb1781faa5b3b
MD5 8a54ab8c1254941d3d719cb598dfa89f
BLAKE2b-256 0bb31c2fc3f0fd517465a79b3474bc01191f6de401b7003f33907218d221ec74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 46769801b36a8fe843da2865a6fb1483cbe66babc234bfa2b0fb57a477800a31
MD5 e80b456930e4080cbcc4e85c9dafc9bf
BLAKE2b-256 c250f35624c23ba759dcb649e275223230418fd88fa454d3349aa41db9d951e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 6bf2440951e38a15cc21ccb44407f852294a4ebff252ba84be5854d2d51395e2
MD5 9f5ed3d1ffadc2ac5141b82745073671
BLAKE2b-256 fb2fb56f822f53c60d89d4f56fc232d85fc9e4c5529104bb913d55a5c78f6a1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4e70e7d4b1c155150608ee9a28fc34e1b5959bfd4d2e82a71b88328bdcea264b
MD5 8dc1f44f510578221fe6ec36e94c7115
BLAKE2b-256 397e4b6ef986cd868d22b98a7a914219de35ef1a2463b640ba8ebebff86daa59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 fc62a7f34710c23f31c8fe0aeacaaefeac17b02889666a0fb6ef57b79bf7f378
MD5 74e94f7bec8f02fa5749363158884a66
BLAKE2b-256 95b2b87a29f8a7ca1e522e265879278330878b7a62ec2106a60542fd81aa3f16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 39d9e891506ed309ad51780e1afa7f023f56467b6f404483a0c6f746b3c4d423
MD5 71c36f9ee7b792ad55a88194920e0ca0
BLAKE2b-256 6f0880f2f7ed0fabb164ba42eefbaac9d7451c920956b57474e43ea2a87ac410

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 46f6922165c000004340978be667329e0fbbf3f5035dabfb403d2126f74003d2
MD5 27dd863debb491742d93d6d274c360da
BLAKE2b-256 72de0c344749eb5e93c33e5d4c089d5a7314b713a9382d5c9adaabecb445fb00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 90a951fe24141d8993048ea712484e6873f510f20265c65fed8ffe252598fd28
MD5 e7867b3012fdfe8bc2f9f96efcb877eb
BLAKE2b-256 39caa682c31411f6d0de76d5ec37cac7c056370c6011b9c9ffb27d48df319e81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 05b4b6ad8db51f58e4fe25ac4934bcbaa2ac027e6e2f39f5f2509a70fec1f83c
MD5 8cb977b93b04ec769bc3a80add608bba
BLAKE2b-256 b255c4174c1d618bb9dc219eaa7a49b10f05600c50d4d82e60a019c3791a1717

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9f4be1433c83558fc90b4b5290f4a0f9362203d0d754dd2bb30d458f9a474d8b
MD5 cbe305c7e57b9f5fc183aab863435925
BLAKE2b-256 9c9a0d22325a25d2f05e713478ae8b42b015715f1b9abbdf0077e7fc86ecc350

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 69da9e067e553463e74b707721bfe6ff6e196f1f06e92e7535221b52907720ac
MD5 986684e23a6789acedcb92b10581987a
BLAKE2b-256 3cd7b072d684131fbdeec65b7e3f70b49d011655b9947cb0936c7510f387ae62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1544cbac292991317ab78343405b80053dac2d41b5ffb44c084a199dd51fb657
MD5 8fd220a9e0d27f3d2011392b2a0c1015
BLAKE2b-256 7a272bcf128c8d430bded9baf17fde6e32fb9c0b3c1ba7132ff5b2e8d0df7dab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 17b00dd06f0df73d331f543229de15658de99067e77f56d8514d6c455fa1264d
MD5 3a342b30ebb6f88606243478c16e2182
BLAKE2b-256 4f6fc629ddfd468cb7725ba9bb04f8bfcb72b6941e9551e7977186c91e54b07b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cac925448c53a8e1333c2f72f5c53115f603415574706a9fc615f6909cd10d33
MD5 83a64d6d9af34fcb0edd88886d6b3145
BLAKE2b-256 d594a4791ad798bb79968309b620cab483dba95d1887b512268f34095a6a6736

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a5-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2a9bacd30cf848fcb1cc779e79bd83fd911817f45f3c63fa87fd3bf851bf3791
MD5 4a93718cc068a670d6f17511126dab86
BLAKE2b-256 fb79d13a9f753551e560f6260301bcc044e295b57ff8b89874f3052700c17102

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