Metadata-Version: 2.4
Name: minimindslab-json-stringify-stable
Version: 0.1.0
Summary: Deterministically serialize common Python objects to compact, stable JSON with sorted keys and consistent handling of sets, tuples, and dataclasses.
Author: MiniMindsLab
License: MIT
Keywords: json,deterministic,stable,serialize,testing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# MiniMindsLab Stable JSON Stringify

Deterministically serialize common Python objects into compact, stable JSON.

## Why

This package provides a tiny offline helper for reproducible snapshots, hashes, fixtures, and diffs in tests and developer pipelines.

## Features

- Stable output across repeated calls for equivalent input
- Dictionary keys sorted at all nesting levels
- Deterministic handling for:
  - `dict`
  - `list`
  - `tuple` (encoded as JSON array)
  - `set` and `frozenset` (sorted, encoded as JSON array)
  - dataclass instances (converted via `dataclasses.asdict`)
  - primitives: `None`, `bool`, `int`, `float`, `str`
- Compact JSON (no extra spaces)

## API

```python
from minimindslab_json_stringify_stable import stringify_stable

text = stringify_stable({"b": 2, "a": (3, 1), "s": {"y", "x"}})
# => {"a":[3,1],"b":2,"s":["x","y"]}
```

## Error behavior

Unsupported objects raise `TypeError` with the unsupported type name included.

## License

MIT
