anyjson
Wraps the best available JSON implementation available in a common interface
What it is and what it does
Anyjson is a JSON library wrapper that was designed to automatically detect and use the fastest available JSON implementation on a system, presenting a uniform API regardless of which backend is installed. It provides serialize() and deserialize() functions that work consistently across different JSON libraries, with standardized exception handling (TypeError for non-JSON-serializable objects, ValueError for invalid JSON).
The package is now obsolete. Modern Python includes a built-in json module that is fast and stable, eliminating the need for a wrapper layer. The package has been abandoned since its last release on 2012-06-22 and receives no maintenance or updates. It was originally part of the carrot project and targets only Python 2.4–3.1, making it unsuitable for current development.
Use it for:
- Legacy codebases written for Python 2 that depend on anyjson and cannot be easily refactored to use the built-in json module
- Projects that require runtime selection between multiple JSON backends for performance tuning on specific systems
- Code that needs consistent exception types across different JSON library implementations
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Anyjson provides a uniform API for JSON serialization and deserialization by automatically selecting and wrapping the fastest available JSON library on the system.
No. The package is abandoned (last release 2012-06-22) and targets obsolete Python versions (2.4–3.1). Modern Python includes a robust built-in json module that eliminates the need for a wrapper. Install friction is high and compatibility with current Python versions is unverified. Use the standard library json module instead.
Install
anyjson on PyPI
pip
pip install anyjsonuv
uv add anyjsonpoetry
poetry add anyjsonInstalling anyjson
Before you install
High install friction due to source distribution format. The package is abandoned—last release was 2012-06-22—and no longer maintained. Modern Python versions have built-in json support that supersedes this wrapper's original purpose.
License in practice
BSD license is permissive and poses no restriction on use, modification, or distribution in proprietary or open-source projects.
Quickstart
import anyjson
# Serialize to JSON string
data = anyjson.serialize(["test", 1, {"foo": 3.141592}])
# Deserialize from JSON string
obj = anyjson.deserialize(data)
Package targets Python 2.4–3.1 and is not maintained for modern Python versions; compatibility with current Python releases is uncertain.
Verify before relying
- Whether anyjson works reliably on modern Python versions despite lack of recent maintenance
- Current status of the Bitbucket repository and whether it remains accessible
- Whether the package's JSON backend selection logic still functions with contemporary JSON libraries
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 5,166 days since the last release |
| First released | |
| Downloads | 105,255/month — #12,711 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: anyjson-0.3.3.tar.gz
Keywords: json
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
orjsonorjson is a fast JSON serialization and…
copyleft · top 1,000 on PyPI
interchangeInterchange provides data types and interchange…
permissive · top 15,000 on PyPI
phpserializeConverts Python objects to and from PHP…
permissive · top 15,000 on PyPI
json_logic_qubitParses and executes JsonLogic rules—a…
permissive · top 15,000 on PyPI
oslo.serializationoslo.serialization provides serialization and…
permissive · top 5,000 on PyPI
apischemaApischema handles JSON…
permissive · top 15,000 on PyPI
jsonobjectjsonobject provides a Python library for…
permissive · top 15,000 on PyPI
python-rapidjsonFast JSON serialization and deserialization…
permissive · top 5,000 on PyPI
infinityProvides an Infinity class that can be compared…
permissive · top 15,000 on PyPI
ujsonUltra-fast JSON encoding and decoding in pure C…
permissive · top 1,000 on PyPI