skillfed

standardjson

JSON encoder that aims to be fully compliant with specifications ECMA-262 and ECMA-404.

standardjson v0.3.1 185.7K downloads/30d#10,003 on PyPI18
Permissive license BSD Abandoned released

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 on this page — 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

standardjson on PyPI

pip

pip install standardjson

uv

uv add standardjson

poetry

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 not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 4,468 days since the last release
Last repo commit
First released
Downloads 185,700/month — #10,003 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: standardjson-0.3.1-py2.py3-none-any.whl

Keywords: standardjson

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3

Tags

json encoder datetime supportserialize decimal to jsonecma-262 json compliancepython json with date objectsextended json encoderjson encode datetime
json-serializationlegacy-python

More Utilities packages