"morejson is a drop-in replacement for Python's json module that"
Project description
" handles additional built-in and standard library Python types."
Home-page: https://github.com/shaypal5/morejson
Author: Shay Palachy
Author-email: shaypal5@gmail.com
License: 'MIT'
Description: morejson
#########
.. image:: https://travis-ci.org/shaypal5/morejson.svg?branch=master
:alt: morejson build status on Travis CI
:target: https://travis-ci.org/shaypal5/morejson
``morejson`` is a drop-in replacement for Python's ``json`` module that handles additional built-in and standard library Python types.
.. code-block:: python
import morejson as json
import datetime
json.dumps({'now': datetime.datetime.now()})
json.dumps({'set': set([1,2]), 'complex': complex(32, -4)})
.. contents::
.. section-numbering::
Installation
============
Install ``morejson`` with:
.. code-block:: bash
pip install morejson
Use
===
``morejson`` implements the exact same API as Python's built-in ``json`` module; the ``dump``, ``dumps``, ``load`` and ``loads`` methods wrap around their ``json`` counterparts without changing their interface, while any other function or attribute is left unchanged.
You can use any argument of these methods, including ``default``, ``cls`` and ``object_hook``; ``morejson`` will wrap around any kind of custom behaviour you provide, giving it priority over ``morejson``'s encoding or decoding, and allowing you to use it with any custom JSON encoding/decoding code you have.
Supported Types
===============
Built-in Types
--------------
* set
* frozenset
* complex
datetime module types
---------------------
* date
* time
* datetime
* timedelta
* timezone
Credits
=======
Created by Shay Palachy (shay.palachy@gmail.com).
Inspired by a great Github gist by abhinav-upadhyay: https://gist.github.com/abhinav-upadhyay/5300137
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Home-page: https://github.com/shaypal5/morejson
Author: Shay Palachy
Author-email: shaypal5@gmail.com
License: 'MIT'
Description: morejson
#########
.. image:: https://travis-ci.org/shaypal5/morejson.svg?branch=master
:alt: morejson build status on Travis CI
:target: https://travis-ci.org/shaypal5/morejson
``morejson`` is a drop-in replacement for Python's ``json`` module that handles additional built-in and standard library Python types.
.. code-block:: python
import morejson as json
import datetime
json.dumps({'now': datetime.datetime.now()})
json.dumps({'set': set([1,2]), 'complex': complex(32, -4)})
.. contents::
.. section-numbering::
Installation
============
Install ``morejson`` with:
.. code-block:: bash
pip install morejson
Use
===
``morejson`` implements the exact same API as Python's built-in ``json`` module; the ``dump``, ``dumps``, ``load`` and ``loads`` methods wrap around their ``json`` counterparts without changing their interface, while any other function or attribute is left unchanged.
You can use any argument of these methods, including ``default``, ``cls`` and ``object_hook``; ``morejson`` will wrap around any kind of custom behaviour you provide, giving it priority over ``morejson``'s encoding or decoding, and allowing you to use it with any custom JSON encoding/decoding code you have.
Supported Types
===============
Built-in Types
--------------
* set
* frozenset
* complex
datetime module types
---------------------
* date
* time
* datetime
* timedelta
* timezone
Credits
=======
Created by Shay Palachy (shay.palachy@gmail.com).
Inspired by a great Github gist by abhinav-upadhyay: https://gist.github.com/abhinav-upadhyay/5300137
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
morejson-1.0.8.tar.gz
(20.7 kB
view hashes)
Built Distribution
Close
Hashes for morejson-1.0.8-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 130c18cf3282e961557e47c1e1ea62a35dac1743d6c6eecce4f47d8fddedf9f7 |
|
MD5 | f6d263d335a1a89339df3de6a8b33caa |
|
BLAKE2b-256 | 7f06525057ffe6e21bde22aadc2217cee6788c05373b9ffa4479d681529ac689 |