Skip to main content

Well-structured helpers to help serializing commonly encountered structures to JSON (like datetime, to_dict(), etc.

Project description

https://travis-ci.org/mbr/jsonext.svg?branch=master

jsonext makes it easy to serialize objects outside of the standard Python primitives to JSON:

>>> import jsonext
>>> from datetime import datetime
>>> jsonext.dumps(datetime.now())
'"2014-03-22T22:17:18.304528+00:00"'
>>> jsonext.dumps(i**2 for i in range(10))
'[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]'

It uses mixins to the standard encoder to achieve this and is easily reuse- and extensible. Check out the documentation for details.

Project details


Download files

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

Source Distribution

jsonext-0.4.2.tar.gz (9.6 kB view details)

Uploaded Source

File details

Details for the file jsonext-0.4.2.tar.gz.

File metadata

  • Download URL: jsonext-0.4.2.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jsonext-0.4.2.tar.gz
Algorithm Hash digest
SHA256 e7634e0b8d1a668bd2c92db5498f6162573feb72ac050c4415384e773b1ea091
MD5 59207a244eba23bf628ed24935e4eee7
BLAKE2b-256 61820f25c43a8a870c2de367c4769809be26c7da38d0e2681b83788d7e295058

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page