A compact yet readable JSON formatter
Project description
pyFracturedJSON
Adds FracturedJSON support to python, allowing you to create JSON that is both compact and readable.
You can trivially use it as a drop-in replacement for the built-in json module:
import fracturedjson as json
long_list = [f"thing_{i}" for i in range(20)]
data = {"abcd": "abcd", "long_list": long_list}
print(json.dumps(data))
print(json.dumps(data, line_length=50))
print(json.dumps(data, indent=2))
with open("file.json", "w") as f:
json.dump(data, f)
with open("file.json") as f:
json.load(f)
json.loads('{"foo":"bar"}')
Or, if you'd prefer:
import json
from fracturedjson import Encoder
long_list = [f"thing_{i}" for i in range(20)]
data = {"abcd": "abcd", "long_list": long_list}
print(json.dumps(data, cls=Encoder))
print(json.dumps(data, cls=Encoder, line_length=50))
print(json.dumps(data, cls=Encoder, indent=2))
with open("file.json", "w") as f:
json.dump(data, f, cls=Encoder)
This is largely a wrapper around fracturedjson-rs, so credit to the creator.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfracturedjson-2.1.1.tar.gz.
File metadata
- Download URL: pyfracturedjson-2.1.1.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f895454ae7db27607042068f85f108a1bd750292a7ea25816f73180d0b988842
|
|
| MD5 |
2e597bce177bc9ee2c92166d8e3b973d
|
|
| BLAKE2b-256 |
f009d51f86e7ac728112fcdfdf3db5a86ecd2415a046f37cb50e5b0b20e5ecd2
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-win_arm64.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-win_arm64.whl
- Upload date:
- Size: 187.8 kB
- Tags: CPython 3.9+, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf74c6f1304646b0466ca1d6d97ce33f47bec2955c2bbfcd9246ff0cf74ed94f
|
|
| MD5 |
bb23dc35e95a226f158257d549206587
|
|
| BLAKE2b-256 |
4ed6fe3ba621ae763a27f19cbd3cfb24caae9b7ffebe2b81867fd7c56817e652
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 193.0 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46b2fe5bdaf05f08fd0457dcfa6caf747c8ac5518ef17b9df3a67081a01b2acc
|
|
| MD5 |
fa74e98f370728c95d823a500f7448e1
|
|
| BLAKE2b-256 |
454c39195e4ad1e9cb4c1bf55c33507565e2b97638e5918b658123ed080b9146
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-win32.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-win32.whl
- Upload date:
- Size: 182.9 kB
- Tags: CPython 3.9+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
380b8f9dbad4978679de4eabf67e8e0fb5da19b266c7fdab98e5f59b26685ecd
|
|
| MD5 |
45510d0cde9d6cf2abc7a22b648faa3a
|
|
| BLAKE2b-256 |
41dc8215bded5dbd6e24072ef332e46ac09fe63b259068b0ca01c4f663bc2e99
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 534.9 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fc8ba188e8e9f29d419e4a743dfe4a3586e8565e5e9f012c6824bb5fb99204b
|
|
| MD5 |
618640693f67d9c9c144ef26ca2ae2ed
|
|
| BLAKE2b-256 |
2bab4fc3f25d521400c08e84020865ba7438c6c8bc6296985a1cb6f07ec4de99
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-musllinux_1_2_i686.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-musllinux_1_2_i686.whl
- Upload date:
- Size: 569.2 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f523e06e433840ee2eb4058dde9311e11feee68e8430659322398d3d386af211
|
|
| MD5 |
ee3db2126bd41c04152ac31ea4669f9c
|
|
| BLAKE2b-256 |
c7ab32bbed6ac66987e4123ee25fbaa18a4038c8e9ef4e5ec496694a61c410d6
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-musllinux_1_2_armv7l.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 606.4 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
128d2b6531a678d675aa812a6fff9153b76db343ce378f7667438fc147a93368
|
|
| MD5 |
e1e023183c5dce29b1a866a2558fe16b
|
|
| BLAKE2b-256 |
a8edf98c7f90cdb51f2c82b915afa8b393cf51f0d0a8d751327e67102d1fb06c
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 501.1 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84d3d9903a33f99d0fc1a911907a7cc3f1fce8eb5a0928fa4de5059ffd01e2cd
|
|
| MD5 |
45ae5a3c673385c0a54d25c4fac75f74
|
|
| BLAKE2b-256 |
e011506181604d4dd406015a2f9a94f89e057fe7f30f013359719406056a8b7f
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 335.4 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d0cd50b2b8bfa84da73a659f9b8edf9275726943eb749a4343a02dcd16100b6
|
|
| MD5 |
69b6ebe49b8a2bfd0bf4f25ae0766b6d
|
|
| BLAKE2b-256 |
318c418d810ac08ab3ba592341eb271d3e69a8d59327ee4a2939f759ab13a678
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 365.9 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7968d5d2cd8d0532edb0a84daf1fb73c3207ff4adcadaa8e9758bda8fcb68d62
|
|
| MD5 |
17870c8dae936354eae443a5326af99f
|
|
| BLAKE2b-256 |
a0f3672f75a8960d0128bde7c58a6adc042b754c89d953b5421b4632b3ef1c8d
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 442.3 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d564895b9fc8f673421a093873ffdde843c9f6e6fbfb3079d4e4342c3a15fba3
|
|
| MD5 |
0b0d8d95d7910c697e615d6d1a90550d
|
|
| BLAKE2b-256 |
e66974b3550aa9548d9f4501dbf3593d02858804eccf93399c52322709307db1
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 331.8 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddbc765cd29cf88677987762c99690f547a0d5e0c11dc9b84a10ecf86d0e8810
|
|
| MD5 |
a3c3fc162a54c411e5b746665780803f
|
|
| BLAKE2b-256 |
d7fad5c70b5cb6823d431a30a27e5a495f5ff088627df7a527f0af864e1f53a5
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 325.7 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3b591ab6c3a7857c3263d2580ec3c45037a4a5fbae423e67acef140905ac823
|
|
| MD5 |
1f6ef05af52f2a12207b3b66359c67f0
|
|
| BLAKE2b-256 |
b7bb284783ad04b33462137b850fdbb1b8f08ed67ad1368c032f2c3f7c2d03f9
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 351.8 kB
- Tags: CPython 3.9+, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df456059b99a5d20a617580d997c7445cd0ea700fa613b0593efb9b3ace6b7d5
|
|
| MD5 |
8ea530069b5c052baa6099ea7a58e80a
|
|
| BLAKE2b-256 |
a34413a05c3dc46f249799283bf36ac7859a22796f3fad584c65e020581086c9
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 290.7 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44db68017bb071c54002aa68feeb750a61ddb1bfef1c34f9b389b1ea71766772
|
|
| MD5 |
f5e14b3b0dc13df399d75debcfd350a4
|
|
| BLAKE2b-256 |
cd50ba0a7230731d5895d6aa1c2a94861453096fadc464e9bca8da7060c94b90
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 295.9 kB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6faf370bed65524c87cd3677071dd8f23b1fe77fc86774cd23126d2adc024360
|
|
| MD5 |
de5c45d85bc58db1d7722bc4fbc31f09
|
|
| BLAKE2b-256 |
38a2e9ea3e06613a95e8f36621acabe0d5508a668b014c170316c4c797c7ab02
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-android_24_x86_64.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-android_24_x86_64.whl
- Upload date:
- Size: 348.6 kB
- Tags: Android API level 24+ x86-64, CPython 3.9+
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b02ad7a65f429a7f3c889ad4afcc4b72ec85c0d94868d0c9bd82539aa04dad4
|
|
| MD5 |
3d550c5d84ce827acb8c5dfb2dfde999
|
|
| BLAKE2b-256 |
f60836889a3a14a0f43e36c0972f40e9d03689228d0c5919fb009d1c45a11a7f
|
File details
Details for the file pyfracturedjson-2.1.1-cp39-abi3-android_24_arm64_v8a.whl.
File metadata
- Download URL: pyfracturedjson-2.1.1-cp39-abi3-android_24_arm64_v8a.whl
- Upload date:
- Size: 352.3 kB
- Tags: Android API level 24+ ARM64 v8a, CPython 3.9+
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c48cfe4027e14ea86dc630f4dabdf0e5579225d217c35086d5d0de67fe8625d
|
|
| MD5 |
613964a07d9558ae7571c177b282fe21
|
|
| BLAKE2b-256 |
4a6a01deb685648fcfb90946e90622c316a3eb9bfcf409418bc27015e3d7f09e
|