--- id: jsonable version: "0.3.1" license: MIT license_treatment: permissive maintenance: dormant --- # jsonable — An abstract class that supports jsonserialization/deserialization. License: permissive · Maintenance: dormant · Downloads: 247.2K/mo ## What it is and what it does jsonable is a lightweight library that provides an abstract base class (JSONable/Type) to make Python objects trivially serializable to and deserializable from JSON. You define a class inheriting from jsonable.Type, implement an initialize method to set attributes, and gain to_json() and from_json() methods automatically. The library handles the round-trip: objects convert to plain dicts and back without manual encoder/decoder logic. The package has no runtime dependencies and installs cleanly. However, it is dormant—the latest release was 2015-10-01, and there have been no updates since. This means it was designed for older Python versions and has received no maintenance for modern language features or security patches. It remains functional for simple use cases but is not actively developed. Use it for: - Serialize custom Python objects to JSON for API responses or file storage without writing custom encoder logic. - Deserialize JSON data back into typed Python objects with automatic validation through the initialize method. - Define nested object hierarchies (e.g., a Pie containing Fruits) that convert to and from JSON structures automatically. - Build lightweight data models for small projects that don't warrant a full ORM or schema validation library. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides an abstract base class for defining Python objects that serialize to and deserialize from JSON with minimal boilerplate. Yes, if you need a minimal JSON serialization layer for simple, self-contained objects and are comfortable with dormant maintenance. No, if you require active support, modern Python version guarantees, or complex validation—use dataclasses, pydantic, or marshmallow instead. The package works but has received no updates since 2015 and should be treated as legacy code. ## Install pip install jsonable uv add jsonable poetry add jsonable ## Installing jsonable Before you install: Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2015-10-01 and no commits since 2024-07-31, so expect no active support or updates for modern Python versions. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install jsonable import jsonable class Fruit(jsonable.Type): __slots__ = ('type', 'weight') def initialize(self, type, weight): self.type = str(type) self.weight = float(weight) fruit = Fruit('apple', 10.3) json_doc = fruit.to_json() fruit_restored = Fruit(json_doc) Verify before relying: - Whether the package works reliably with Python 3.10+ (no explicit version support declared; last release predates modern Python versions by years). - Whether the abstract base class approach remains practical compared to modern alternatives like dataclasses or pydantic. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 247.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags json serialization python, json deserialization objects, python object to json, json-able data types, serialize python classes, json round-trip objects, json-serialization, legacy-stable [View on SkillFed](https://skillfed.io/packages/jsonable) · [View on PyPI](https://pypi.org/project/jsonable/)