Metadata-Version: 2.4
Name: pyfracturedjson
Version: 2.0.0
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Summary: A compact yet readable JSON formatter
Keywords: json,formatter,fracturedjson,compact,readable
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/g-b-f/pyFracturedJSON

# pyFracturedJSON

Adds [FracturedJSON](https://github.com/j-brooke/FracturedJson) support to python,
allowing you to create JSON that is both compact and readable.

Using it is easy:

```python
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)
```

You can also use it as a drop-in replacement for the `json` module:

```python
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"}')
```

This is mostly a wrapper around [fracturedjson-rs](https://github.com/fcoury/fracturedjson-rs),
so all credit goes to the creator.
