Thanks for considering a contribution to safejson. Keep changes
small, tested, and aligned with the existing public API. This project
parses hostile input, so correctness and honest documentation matter
more than clever shortcuts.
python -m pip install -e ".[dev]"
ruff check .
pytest --cov=safejson --cov-branch --cov-fail-under=100
mypy --strict src/safejson
python -m build- Add or update tests for behavior changes.
- Keep branch coverage at 100%; new scanner branches need direct tests.
- Keep README examples in sync with the implementation.
- Keep runtime dependencies at zero unless there is an exceptional reason.
- Prefer explicit errors over surprising coercions.
- Preserve the scanner/decode split: resource limits belong in the iterative scanner, while duplicate-key and type policies belong in decode hooks.