orjson is a fast JSON serialization and deserialization library for Python built in Rust.
The library addresses the need for high-performance JSON handling in Python by implementing core serialization and deserialization logic in Rust via PyO3 bindings. It achieves substantially faster performance than the standard library json module and other third-party alternatives, with serialization roughly ten times faster and deserialization roughly two times faster. The tool natively handles dataclasses, datetime objects, numpy arrays, and UUID instances without requiring custom serializers, while also providing a default parameter for caller-specified handling of arbitrary types and flags to control output formatting.
Developers should adopt orjson when performance is a priority in JSON-heavy workloads, particularly those involving scientific computing with numpy or applications using dataclasses and datetime objects extensively. The library is production-ready for CPython 3.10 and later across major platforms and architectures, with optimized wheels that take advantage of AVX-512 instructions when available. The tool deliberately does not provide file I/O or line-delimited JSON handling, so projects requiring those conveniences should handle them separately. The project does not support PyPy, embedded Python builds, or PEP 554 subinterpreters, and maintains strict semantic versioning where serializing new object types requires an explicit opt-in flag to avoid breaking changes.
Development activity shows a conservative, stability-focused approach. The maintainer does not maintain an open issue tracker or accept pull requests, citing signal-to-noise ratio concerns. The project publishes a detailed changelog documenting all changes. The tool may support PEP 703 free-threading when that specification becomes stable, indicating willingness to adopt new Python features once they reach maturity.