talira

UltraJSON (ujson)

Fast JSON encoder and decoder for Python, written in C

open sourceBSD-3-Clause AND TCLfree

UltraJSON (the ujson package) is a JSON encoder and decoder written in C with Python bindings, usable as a drop-in replacement for most other Python JSON parsers. Its makers have put it into maintenance-only mode: they'll add support for new Python versions and fix critical bugs and security issues, but reject other changes, and they encourage users to move to orjson.

Problems it solves

  • speed up JSON encoding and decoding in my Python service
  • replace the standard json module with something faster without changing my code
  • an older Python project depends on ujson and I need to know whether it's still safe to use

Features

  • ujson.dumps and ujson.loads, drop-in for most JSON parsers
  • written in C
  • encode_html_chars and other encoder options

Limitations

  • In maintenance-only mode: only new Python versions, critical bugs and security fixes are accepted, and its makers recommend orjson instead.1

Alternatives

The same job

These do what UltraJSON (ujson) does.

  1. orjson Fast, correct JSON library for Python

Compare UltraJSON (ujson) with the top 3