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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13Windows x86

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

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12Windows x86

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

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11Windows x86

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

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c0a6087ceca48b7a4ef2b1de95dbddd877479d6b0421a4e86242cd58e7115d32
MD5 c3edf3df69260e70944dd1750f499bd6
BLAKE2b-256 688b0a5672b4f83798c831492b0d35f552c4d0900f36423276f154f3786c07f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 bbefe10b67aa6c2e6cdb73abd53fc1553c87f107d4b4923a0d15a097d6bc1405
MD5 8bb1e179f04c5ab81ab7b95d40eecc18
BLAKE2b-256 7bc4e30988ad3cbe09325a212697783867642be102c83a031d183d4d2340a769

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1081022c2b64edd55dc0e1d1a4e8f5cee7883a89b5f048804252e0ba85697d5d
MD5 84a1fa28a5dad4105417824a4a44df64
BLAKE2b-256 e5753c31c9901c808cdcd8abeac510c4a81dd39e1eb80fbef70c597fe27360f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 c175513bfd898099a80377e1faf5c471d3df63f4220e594ce6c8cec81f3ef4b3
MD5 68afcbfbf9cd858b05cbee1ef592cec0
BLAKE2b-256 caf4d743cc8142379afe2ff679bc5388109cf35b21fbccef314804791ab8a20e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 61b339c65ca230d3234b7cc06ab00f83408671a0bd5eab152174022f2834acd3
MD5 778cbf47d2ec7a6290a2351884dcca29
BLAKE2b-256 40a2f2e40da8a0c62d0bd36d0bbb699e9a4f811dd878c3bce5153dd61a27c981

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 43ab4cafc320913dda6894ac6c28dd510c199439daad6ad46d7e0ba794726b35
MD5 9dfb7e10b03ba13ec33f81c78132a992
BLAKE2b-256 d4bc82c4a4187775ac5ab34f3996f560a67efa9e36a5b5a613fbe99d1a7bba33

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ca3390806ef527843ba7656d3529edd4c813383f792b673f12a4499c4b1cd5e9
MD5 da369622622bc737c1fb895f7aabda99
BLAKE2b-256 306ff47e9ea0baa00099becfaf8a4132c6efa5569f0bb0b3b0555cb0a6cb5820

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 918790b09ba63f995509a77158204781bfffd28f3f822bb422085a785e3630a6
MD5 78f2c449c81bc1458258179a9ff9d9a9
BLAKE2b-256 751711f441ffcd4894bb231143bdcc3cc17c96b3b8f613121aad4c0e460bf624

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 13945b0e6594dac9f84f776fb120dc324479bfb89523b02279dad761439efc16
MD5 125872c82dac02ab544530e8718d5f24
BLAKE2b-256 2a7e3a58bbfd8bfc0247f99d6d23fe6e39923fbcfe8801276cb7089448545bc1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 cece559064506ee76e62250a5fd83c4e6984b241c45ce9331d9fe08fe93c5ee7
MD5 69a77be633a17581a4faa4c0d7a36253
BLAKE2b-256 2431f1e172526e40a6aca508ef37136623a8053a285336092d9264be677ccba8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d669c9c726fb93590ef930352a7826f360f18c93017eba30006154c858d64e0c
MD5 ff984e430489ea5242aeec761f426c6e
BLAKE2b-256 2bd2842c6e96b3c85bc78d4e854f09e658f2a29039838f5fa933b263b8a7a603

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 f9b53ff65caba57371d39987e835dc9fe00f863fd87ecdfec1ca400aed7e0b4d
MD5 1342d854d9e330930011d7e0911dd10e
BLAKE2b-256 7f08e9b321aab4cf312edb75fe3abcce2288e44fce55a552882886b2ca686d37

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3a382027a6ddd305dfae81dc53dd71ce85ed96bdfc70ca0a0084ca498c11de40
MD5 4b97ce1426d6b8da016aa430cd08f7d8
BLAKE2b-256 8ffb09b073d7204a5aae590c4594d94bca70ff28753f52ea4a0d334d25b4787e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4b5ee26cb333967fca92e526aa93eb26f759e99e074790bddb877e4752de35c6
MD5 93aaf02ff634c4f11a204139ad4e6586
BLAKE2b-256 5dc80c20ea456c840ba126a324bef19c4866ed668ec6b7022e4949612343fd8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bf5f31eb45421177b82ace7ccd1e12ba73eb6c147bd0755a7c26702753050088
MD5 0ecc24b5d73663774c86c62da9336fd6
BLAKE2b-256 dfd424b4092a9ef9075760bcb0c2b687d2d0f92624a8c6e0bd6df03e895a3c32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9db076570dc07327906d99df9850713d2f080d0165a6e9a941c2c369519a7fb7
MD5 7e6d43eaa822b64ea53b684f111f199e
BLAKE2b-256 8bb6046d04aa9956011271050a5b1730ad6f118d86b419a0c41a2e7e0c7b5a9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ed603ff5522580036dea2dcd446a0f004cd207572910ffbf1314f02a678363c2
MD5 fdc5e9b3558a138734f034f356d73ce0
BLAKE2b-256 46aa65ff9c08f1f4722d2b2e9b09a5b11e9a9b6f96f181b002866458507bd071

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 f79caec1bb7e61488ed3671be75f7192690acf25155de177705c747a691c092e
MD5 8e6f30ad4a11375c16e5c02b227cf886
BLAKE2b-256 9dfa220e71ea33c95ce1f1b4e76161ac8c5c17d62d9f67b6bb3c655f39ab93af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 176ccfffda8c38597eb7160dbcdeb7781a7d58772f3426349303343db86ab185
MD5 14979d8fece4959ac64e76c6fca1d9b4
BLAKE2b-256 e41a7389e805e1d6670d2481accf639fe93f5b412ca4475b3f67a07b07e29f47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 2157d8abe1eab48a638cad386a29d2dc21f1d5c1d4b7df7191d83bf949c0c4b2
MD5 e600a0028ab3f947430b2a6ccf4bb109
BLAKE2b-256 fa82b47830c8eece44474ac5f21f1d09d2e1fee96dee6c32164b18c431444e62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0b46bac5aae6734761b754fe7c9c59f548a55200e6e79e9e3ede3dc6daa83183
MD5 caefbcf705fb2ea6303bc42978339442
BLAKE2b-256 55538e2321f35d81e5c61430dab86b1b8cc28ea0ff84d80307f9681cf102506c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d2db67b6001c8131e32bed0c4a631c9771c59e2e6a8c910a9db878a1bd8c8f0b
MD5 431c7c806bffa613d6b5c8f5c3c94714
BLAKE2b-256 854e1bbcd08be4526805c58bc0f891912e99c4f7584fff5ec4793a7fdc177eea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 736d95ed98d64a2e058f3f57e51a2c262f31a718737151699198f775c5c90219
MD5 6c88f7c8a1b93f04d34789862bf08c11
BLAKE2b-256 629268157a34c1ca7a3f07bd1b9a050352a8395b9faff44c9528a65fb96660c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jsoncompat-0.1.6a6-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 96c72784864f311c2802bdd72e66490d9322f81f955c129eee46620db2d1c944
MD5 c8b3108a0baba2ea65a609031c6e71f1
BLAKE2b-256 e11d371ac6f2f8361f872079387cf8ef0370fc1e0723531f2ca8f22674e59bd1

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