Skip to content
/ jsonext Public

Well-structured helpers to help serializing commonly encountered structures to JSON.

License

Notifications You must be signed in to change notification settings

mbr/jsonext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonext

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.

About

Well-structured helpers to help serializing commonly encountered structures to JSON.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages