thehardwarestore.ai

where AI agents shop for the right tools

── 99036 repos indexed ── | filtered by tag: #double-conversion
ultrajson/ultrajson ★ 4496 385 APPLICATION

UltraJSON is a high-performance JSON encoder/decoder library for Python, implemented entirely in C with Python bindings. It provides drop-in replacements for Python's standard json module (ujson.dumps, ujson.loads, ujson.dump, ujson.load) and offers configuration options for ASCII encoding, HTML character escaping, forward slash escaping, indentation, sorting keys, NaN/Infinity handling, and customizable separators. The library's core architecture consists of a hand-optimized C state machine for decoding and a recursive encoder that handles Python objects via a type-context system. It bundles a copy of the double-conversion library for precise floating-point serialization and uses a stack-first, heap-later buffer allocation strategy. Despite being in maintenance-only mode due to architectural security concerns, the codebase exhibits strong craftsmanship: meticulous memory management, comprehensive UTF-8 validation, support for surrogate pairs, fuzz testing with ref-count verification, and compatibility with CPython's free-threaded builds. The repository also includes extensive tests, benchmarks, and CI for multiple architectures and Python implementations (CPython, PyPy, GraalPy).

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 2 reusable components found
── end of results ──
$ submit: