ultrajson/ultrajson
FreeUltra fast JSON decoder and encoder written in C with Python bindings
About ultrajson/ultrajson
UltraJSON is a high-performance JSON encoder and decoder implemented in pure C with Python bindings. It serves as a drop-in replacement for Python's standard library json module, offering significant speed improvements for serialization and deserialization tasks. The library supports various encoding options including escaping HTML characters, ensuring ASCII output, controlling forward slash escaping, and enabling pretty-print indentation. Benchmarks demonstrate its performance against alternatives like orjson, simplejson, and the standard json module. Note: as of its latest maintenance release, UltraJSON's architecture is considered ill-suited for safe changes, and the project is in maintenance-only mode. Users are advised to migrate to orjson for new projects.
Key Features
Pros & Cons
- Significantly faster than Python's standard json module
- Drop-in compatibility reduces migration effort
- Multiple encoding options for various output requirements
- Widely used and established library
- Project is in maintenance-only mode with no new features
- Architecture carries risk of introducing security vulnerabilities
- Slower than orjson in benchmarks
- Not recommended for new projects; users urged to migrate to orjson