$npx skillfedfor your agent

json-fix

allow custom class json behavior on builtin json object

With conditionsPyPI Software DevelopmentReleased Oct 2025136.1K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — json_fix-1.0.2-py3-none-any.whl
v1.0.2 · released 2025-10-23 · Python >=3.6

Yes, if you need to customize JSON serialization for classes you control or intercept serialization of third-party objects. The package has low install friction, no dependencies, and a permissive MIT license. However, the aging maintenance status (295 days since last release) suggests limited active development—install it only if the `__json__` pattern solves a specific serialization problem you face.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.6 or later; json_fix must be imported before json.dumps is called on objects you want to serialize.
  • Low install friction with no runtime dependencies.
  • Maintenance status is aging—last release was 295 days ago, though the repository remains active and not archived.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice.

last release 2025-10-23 (295 days) · last repo commit 2025-10-23 · 26 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 136,129 downloads/mo, #11,405 on PyPI

Verify before relying

pip install json-fix

import json_fix
import json

class MyClass:
    def __json__(self):
        return self.__dict__

obj = MyClass()
print(json.dumps(obj))
  • Whether the override_table's last-entry-wins priority behavior is reliable across all Python versions.
  • Performance impact when using large override_table or fallback_table dictionaries with many checker functions.
  • Real-world adoption and whether the aging maintenance status indicates the package is stable or abandoned.
Same gist for agents: .md · .json

What it is and what it does

json-fix is a lightweight patch to Python's built-in `json` module that enables custom serialization behavior for user-defined classes. When you import it, it modifies `json.dumps()` to recognize and call a `__json__()` method on any object, allowing you to define how your class should be converted to JSON-compatible types. This solves the problem of third-party code attempting to serialize your objects without knowing how to handle them—instead of forking their code or catching exceptions, you simply define the serialization logic in your class.

The package provides two mechanisms for controlling serialization: an `override_table` for intercepting specific classes before they check for a `__json__` method, and a `fallback_table` for providing default serialization when neither a `__json__` method nor an override rule exists. Both tables use checker functions as keys, prioritizing the most recently added entry. The patch is described as safe, backwards-compatible, and reversible.

Use it for

  • Enable JSON serialization of custom classes without modifying their definition or the calling code that uses json.dumps().
  • Intercept serialization of third-party library objects by adding override rules without forking the library.
  • Provide a fallback serialization strategy for all objects with a `__dict__` attribute, making arbitrary Python classes JSON-serializable by default.
  • Migrate codebases that rely on toJSON() patterns to Python while preserving the same serialization approach.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to customize JSON serialization for classes you control or intercept serialization of third-party objects.

The package has low install friction, no dependencies, and a permissive MIT license. However, the aging maintenance status (295 days since last release) suggests limited active development—install it only if the `__json__` pattern solves a specific serialization problem you face.

Install

json-fix on PyPI

Before you install

Low install friction with no runtime dependencies. Maintenance status is aging—last release was 295 days ago, though the repository remains active and not archived.

Requires Python 3.6 or later; json_fix must be imported before json.dumps is called on objects you want to serialize.

License in practice

MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice.

Quickstart

pip install json-fix

import json_fix
import json

class MyClass:
    def __json__(self):
        return self.__dict__

obj = MyClass()
print(json.dumps(obj))

Verify before relying

  • Whether the override_table's last-entry-wins priority behavior is reliable across all Python versions.
  • Performance impact when using large override_table or fallback_table dictionaries with many checker functions.
  • Real-world adoption and whether the aging maintenance status indicates the package is stable or abandoned.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.6
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 295 days since the last release
Last repo commit
First released
Downloads136,129 / month, #11,405 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: json_fix-1.0.2-py3-none-any.whl

Tags

Capabilities
custom json serializationjson dumps custom objectsdefine json behavior for classesjson __json__ methodserialize custom classes to jsonjson encoder for custom typesoverride json serialization
Topics
json-serializationmonkey-patching

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “custom json serialization”

  • json-fixPatches Python's built-in `json` module to recognize and call a…
  • json-encoderProvides JSON serialization with singledispatch-based type handlers…
  • jsonconversionConverts arbitrary Python objects to JSON strings and back, extending…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also jsonable · jsonconversion · json-encoder · orjson · simplejson · jsons · json-numpy · phpserialize · munch · pyion2json