--- id: orjson version: "3.11.9" license: MPL-2.0 AND (Apache-2.0 OR MIT) license_treatment: copyleft maintenance: active --- # orjson — Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy License: copyleft · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install orjson uv add orjson poetry add orjson ## Description # orjson orjson is a fast, correct JSON library for Python. It [benchmarks](https://github.com/ijl/orjson?tab=readme-ov-file#performance) as the fastest Python library for JSON and is more correct than the standard json library or other third-party libraries. It serializes [dataclass](https://github.com/ijl/orjson?tab=readme-ov-file#dataclass), [datetime](https://github.com/ijl/orjson?tab=readme-ov-file#datetime), [numpy](https://github.com/ijl/orjson?tab=readme-ov-file#numpy), and [UUID](https://github.com/ijl/orjson?tab=readme-ov-file#uuid) instances natively. [orjson.dumps()](https://github.com/ijl/orjson?tab=readme-ov-file#serialize) is something like 10x as fast as `json`, serializes common types and subtypes, has a `default` parameter for the caller to specify how to serialize arbitrary types, and has a number of flags controlling output. [orjson.loads()](https://github.com/ijl/orjson?tab=readme-ov-file#deserialize) is something like 2x as fast as `json`, and is strictly compliant with UTF-8 and RFC 8259 ("The JavaScript Object Notation (JSON) Data Interchange Format"). Reading from and writing to files, line-delimited JSON files, and so on is not provided by the... [View on SkillFed](https://skillfed.io/packages/orjson) · [View on PyPI](https://pypi.org/project/orjson/)