Skip to main content

JSON encoder fully compliant with ECMA-262 specification.

Project description

JSON encoder fully compliant with ECMA-262 specification.


Support for all objects that the Python stdlib’s json.JSONEncoder can encode, plus:

  • datetime.datetime
  • datetime.time
  • decimal.Decimal

Works on Python 2.6, 2.7, 3.3. Probably works on 3.4 and 3.5 but I haven’t set up tests for those with Tox yet.


Use JSON262Encoder as you would use json.JSONEncoder from the Python standard library:

>>> import datetime
>>> import json
>>> from json262 import JSON262Encoder

>>> json.dumps({'day':, 2, 17)}, cls=JSON262Encoder)
'{"day": "2010-02-17"}'


0.2.0 (2014-05-20)

  • Full implementation with tests.
  • Separate encoders module for encoder functions.
  • Bump to Alpha.

0.1.0 (2014-05-18)

  • First release on PyPI.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for json262, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size json262-0.2.0.tar.gz (12.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page