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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13Windows x86

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

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

jsoncompat-0.2.0-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.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12Windows x86

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

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

jsoncompat-0.2.0-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.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11Windows x86

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

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

jsoncompat-0.2.0-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.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

jsoncompat-0.2.0-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.2.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 dc62e167f927a9b84ea4f7f47c266cae7090d27426c988fab0f3d2f64c3fd80e
MD5 877bbd94ba9e983a1abd53fb9d14b81b
BLAKE2b-256 21f30021510f429aef726b848295949c2dd2915a99e3573c80f30cedfa929410

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp313-cp313-win32.whl.

File metadata

  • Download URL: jsoncompat-0.2.0-cp313-cp313-win32.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.9.0

File hashes

Hashes for jsoncompat-0.2.0-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 c28dae669dd14a5cb031f2bf6d30b100b3045f0d697481167ff3fe2d4952a497
MD5 cdf7683a07a5126005e8d0be75f5dea5
BLAKE2b-256 60dedcb6234a87bce9e582a978d38e7d84a89e2e617bd94dbe99219028cf422e

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cfb6757f78b49f4c30cfb64e66726e84ff5d8cc5594cf946190933c6fbcb3904
MD5 1d2bb9d7f3bd367b56fd7f01f34b6c9c
BLAKE2b-256 452802b5ee6dbd998f7e53fb25c70a1a9ae29ab824a357a0c2d82519f3b87d89

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 3c8f1930783e0d60902d450008acc61079c337681c666e3375244976f4907b76
MD5 07dc96d70624e5c24ecf0ac4de0a27d4
BLAKE2b-256 9de93ba8272cbfe926fc8ad7f9b89a51b9db610b4edcf3da1ae12b6e1ebab813

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 862b023ad3c64a1124b3c372fc0682cb94fe3b9a9a025edaf4e6a983a0a47cbb
MD5 b58cdc5a202557b9195618e4525a06ad
BLAKE2b-256 ae62899f526c07d8bff0e542bb117172ce400b4a980ff4c46375d28903d7207b

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 78b33fe54ee27ae995e71da528f6913b3de5bd8d40494826f342a2ff4e818b00
MD5 6f467d55245bf5532b783d490cba5259
BLAKE2b-256 9857e3191009a942d3381de6b3251f86cbe86651077a26ac863c77d2f5ebe2c1

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 70fc0456ebf7968a3cb3dd3bbd1a212c7976a367407fd4b9b1d001eadd67ccbf
MD5 3c5fff20bd827a6545524d10a5a66128
BLAKE2b-256 1f37ef1a7b99b2e2fbbdd6e5dd486dfcb849e46cc170ba3fccaa12365087cdbf

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7a893e5f0fd052204beb89a75a1371ab67f079cb10086222905d4347aac31e41
MD5 7b22159de3439d5ac9aac9b66041a814
BLAKE2b-256 4bdb4ca1a9b8351cc3615728e1c056d6c80b6fb0396205c6c21aa5db02d690fd

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 eaf2c999d211eb6198c770b1f5a965c65293416127d3923c3c03ac83e79cc0eb
MD5 b945e40e4df9f22af378968a29952ebe
BLAKE2b-256 5eb9fa80b228fa43f2ea939350d2899d2ce9d442cc00ee54fd5e6dcce060dfd2

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp312-cp312-win32.whl.

File metadata

  • Download URL: jsoncompat-0.2.0-cp312-cp312-win32.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.9.0

File hashes

Hashes for jsoncompat-0.2.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 06eb59ae94c6c27e9747cdc4eb8a9fc95324e2f0d5f1c43237dca583ec38c95c
MD5 28980df1f609a6005e5c78e902a2f414
BLAKE2b-256 5b57f046d58b0f266f79682474c0572ebf52558d90fba1394d65da85d29b88c7

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 765a691c1e6f47f30a0f958f6de2829d57496f005d820b076f89aa312d1b6d5c
MD5 f668dcd54c62dd480a431b588bd83eeb
BLAKE2b-256 aa34f3cf19d1f22f7ede18e63b7d7cb73318d664e277867972fc98d51555ce91

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 357499ca5840e465932810703c4b39a19e31dabae8966af3ec9c1edc5da5039a
MD5 a84eec62b3a23cf11b313e1f939b4d59
BLAKE2b-256 0ed23a138f0b3acd35a1f048af2b34eb1a01fdbc1701c8caf26edf86c2e02c50

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e5fab66d93c5605f05dc65583bb2bc4c7d45633e9f99166e3edeb6c756e83955
MD5 401714bc43262ba0c958b2ae23fb6b4a
BLAKE2b-256 2c31c6c1a9e86ff7f454869b91cdd314b535ff7e621991888f258dd4ae026710

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c5900bd06e42e23903f9e81b724e64b3f0b902136a3843b014141bb4e9500741
MD5 4bf40559f3fdcde298395b59defe3742
BLAKE2b-256 055e1d120dbcd125c596de63b76bf5f95618a1d51dbf2d107375049100730f72

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e90a5a1e2a712f630e6a971820cc461e31fc055f5dac12fa844a5096f4661be4
MD5 a5951d0daf9f22ba0d229e0d3d9dc2a4
BLAKE2b-256 27e01d5fd626ca4ba5a5020fa49b0c53529941166bde4379d4d7c46e7ca67743

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9074369dc27535cd12bb8e6ee5ab8dccc4e7d4175099c1c7ad8a17c2cca0542c
MD5 ef9ce5cff437d78967a4099f778b576d
BLAKE2b-256 1d446129bac03ff8c30409536196183aba361b33bb52b5cb317c913247cced4f

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f07c174ccc492ce90e78ec3bb58711ac3b4b81509a9619844dcda34f1fc93c22
MD5 1067a79a099828a1fc23b70cc796b312
BLAKE2b-256 5512a960be5918f53d176457e20bb3ee10b1de59bd1bc84b3467ad3fd3c5523c

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp311-cp311-win32.whl.

File metadata

  • Download URL: jsoncompat-0.2.0-cp311-cp311-win32.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.9.0

File hashes

Hashes for jsoncompat-0.2.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 116c30b752aef89dd26d14a6c1efb9f74d882731217f129f7d94988760403ee9
MD5 161e3d1c0865f09b6f423532dd0fa3f1
BLAKE2b-256 4b1db5883b36a4bbf9c0ffe267dc54477d9049c28b464d160b5bad5a3e6c2321

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a548961875becbcd964dae498a97be827869854a017c152adfdea72924df7959
MD5 9c24dd5f9966e446cc4e1b5ac5361afb
BLAKE2b-256 73be0433d39e53126ab771184aeb912799fca98c6e350a8c6880c40326a38b5d

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp311-cp311-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 9ce81b9c36e8b8ad3eac87d2700038421f4645f7ba8d2735a5f8b5b6a4a02997
MD5 efff2267b24fb1602b3a25a1742ac0d4
BLAKE2b-256 86bcbbb2c6029fce8a4ef0220a65de9ee285d8193a3334e28d0d5649f9f6a843

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 538a3e55c3aad21f52a6fa91fcd9a1688e97c50b8b4a789cecde0df86bcd89d7
MD5 6dc420ea94e0a1a4d254a3b10b30afdd
BLAKE2b-256 6d8dba061024758c74c6a97a286d7d6ca7163d2f56e81aff0d0ab1e6965af0db

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 48213a1912808d7e7b6248a7a54b8782e56f26873da9e123b60d23a9c6658575
MD5 8e03285e16df1d3fa5468eae6e02fcce
BLAKE2b-256 d90128bb5b8fe51333ce36140ba4027a8eb8d57282f646df8306bff233b2dc54

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fe45203991c122f30fd787ca9545bf9fc99e04919068efee574c0664f3cd96d6
MD5 396746527d979ed4dfeae84df7fc6f46
BLAKE2b-256 8dd62c611feb25eb49d986bf0aa8b1e1cd470270c28af8dedffb19b42d552d18

See more details on using hashes here.

File details

Details for the file jsoncompat-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for jsoncompat-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ff2a709017721678af89e9d5a4fc40bb872142ba03eac2f89f5d5d7a4e13f35d
MD5 f913d297f1459f8266f51c6cdc90c22d
BLAKE2b-256 99a964fe4382b167f9b6f993586ee820a592fead8b8359945197d69f15cdcf65

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