--- id: standardjson version: "0.3.1" license: BSD license_treatment: permissive maintenance: abandoned --- # standardjson — JSON encoder that aims to be fully compliant with specifications ECMA-262 and ECMA-404. License: permissive · Maintenance: abandoned · Downloads: 185.7K/mo ## What it is and what it does StandardJSON is a JSON encoder that extends Python's standard `json.JSONEncoder` to serialize additional types: `datetime.datetime`, `datetime.date`, `datetime.time`, and `decimal.Decimal` objects. It wraps the stdlib encoder and can be used as a drop-in replacement via the `cls` parameter to `json.dumps()`. The package has no runtime dependencies and installs cleanly as a pure-Python wheel. The encoder aims for compliance with ECMA-262 and ECMA-404 specifications. However, the project is abandoned—it was released in May 2014 at Alpha status and has not been updated since. The codebase was last touched in December 2022 but no new releases followed. It was only tested on Python 2.6, 2.7, and 3.3; compatibility with modern Python versions remains unverified. Use it for: - Serialize Python date and time objects to JSON strings when the standard library encoder rejects them. - Handle Decimal values in JSON output without converting to float, preserving precision in financial or scientific data. - Encode mixed data structures containing datetime and numeric types in legacy systems still on older Python versions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a JSON encoder that handles datetime, date, time, and Decimal objects in addition to standard JSON-serializable types, aiming for ECMA-262 and ECMA-404 specification compliance. No. The package is abandoned and untested on modern Python versions. The standard library's `json` module has evolved, and modern alternatives (or custom encoder functions) are more maintainable. Use only if you are locked into Python 2.6–3.3 and have no other option; otherwise, implement a custom encoder or use a maintained serialization library. ## Install pip install standardjson uv add standardjson poetry add standardjson ## Installing standardjson Before you install: Installation is straightforward with no runtime dependencies. However, the package is abandoned—last commit was 2022-12-26 and the latest release dates to 2014-05-21. It was marked Alpha at release and has not progressed beyond that status. License in practice: Licensed under BSD (permissive), so you may use, modify, and distribute it freely with minimal restrictions, though you must include the license notice. Quickstart: import datetime import json from standardjson import StandardJSONEncoder json.dumps({'day': datetime.date(2010, 2, 17)}, cls=StandardJSONEncoder) Package targets Python 2.6, 2.7, and 3.3; compatibility with modern Python versions is untested and unsupported. Verify before relying: - Whether the package actually works on Python 3.4+ as the author suspected but did not formally test. - Whether ECMA-262 and ECMA-404 compliance claims have been validated against current specification versions. - Real-world usage patterns and whether the datetime/Decimal serialization format matches expectations in production systems. ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 185.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags json encoder datetime support, serialize decimal to json, ecma-262 json compliance, python json with date objects, extended json encoder, json encode datetime, json-serialization, legacy-python [View on SkillFed](https://skillfed.io/packages/standardjson) · [View on PyPI](https://pypi.org/project/standardjson/)