Skip to content

Serialization of Python types to JSON that works out of the box (batteries included).

License

Notifications You must be signed in to change notification settings

randomir/jsonplus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON+

Serialization of common data types (which are out of the JSON specs) that works out of the box (batteries included).

So far, modules (packages) for Python, Flask and Django are implemented, and they support (de-)serialization of types like:

  • tuple and namedtuple
  • set and frozenset
  • complex, Decimal, and Fraction
  • datetime, date, time, and timedelta
  • UUID, moneyed.Money, moneyed.Currency

(in addition to basic JSON supported-types like integers, floats, lists, and dictionaries).

Also, encoder and decoder for custom (user) types can easily be registered (see python example).

Overview

Language/Framework Source Implemented
Python 2.6+, 3.3+ python (De-)Serialization drop-in replacement for simplejson. Exact & compatibility mode supported. See detailed docs.
Django 1.8+ python-django As jsonplus + database model field JSONPlusField.
Flask 0.10+ python-flask Using jsonplus as the default Flask (de-)serializator.
JavaScript n/a TODO

About

Serialization of Python types to JSON that works out of the box (batteries included).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published