orjson is a fast, correct JSON library for Python. It benchmarks as the fastest Python library for JSON and is more correct than the standard json library or other third-party libraries. It serializes dataclass, datetime, numpy, and UUID instances natively. orjson supports CPython 3.8, 3.9, 3.10, 3.11, and 3.12. It distributes amd64/x86_64, aarch64/armv8, arm7, POWER/ppc64le, and s390x wheels for Linux, amd64 and aarch64 wheels for macOS, and amd64 and i686/x86 wheels for Windows. orjson does not support PyPy. Releases follow semantic versioning and serializing a new object type without an opt-in flag is considered a breaking change.

Features

  • Serializes dataclass instances 40-50x as fast as other libraries
  • Serializes datetime, date, and time instances to RFC 3339 format
  • Serializes arbitrary types using a default hook
  • Has strict UTF-8 conformance, more correct than the standard library
  • Has an option for strict JSON conformance on 53-bit integers with default support for 64-bit
  • Does not provide load() or dump() functions for reading from/writing to file-like objects

Project Samples

Project Activity

See All Activity >

Categories

JSON

License

Apache License V2.0

Follow orjson

orjson Web Site

Other Useful Business Software
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of orjson!

Additional Project Details

Programming Language

Python

Related Categories

Python JSON Software

Registered

2023-10-06