skillfed

anyjson

Wraps the best available JSON implementation available in a common interface

anyjson v0.3.3 105.3K downloads/30d#12,711 on PyPI
Permissive license BSD Abandoned released

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 anyjson

uv

uv add anyjson

poetry

poetry add anyjson

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.4Programming Language :: Python :: 2.5Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.1Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: JythonProgramming Language :: Python :: Implementation :: PyPy

Tags

json library wrapperunified json interfacejson serialization abstractionfastest json implementationjson encode decode wrappercross-json compatibilityjson adapter layer
legacyabandoned

More Utilities packages