Custom datatypes (like datetime) serialization to/from JSON.


Keywords
json, custom, python, type, serialization, deserialization, datetime, set, django, flask, json-serialization
License
MIT
Install
pip install jsonplus==0.6.1

Documentation

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

(in addition to basic JSON types).

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