dj
django-jsonplus
pypi i django-jsonplus
dj

django-jsonplus

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

by Radomir Stevanovic

0.1.3 (see all)License:MIT
pypi i django-jsonplus
Readme

Django-JSONPlus

Django extension for non-basic types' serialization to JSON via jsonplus_ lib.

.. _jsonplus: https://pypi.python.org/pypi/jsonplus/

Install

Install from PyPI::

pip install django-jsonplus

Add to your settings.py:

.. code-block:: python

INSTALLED_APPS = [
    <other-apps>

    'django_jsonplus',
]

Usage

To use jsonplus for database values (de-)serialization, use the JSONPlusField:

.. code-block:: python

from django.db import models
from django.contrib.postgres.fields import JSONField
from django_jsonplus.models import JSONPlusField

class MyModel(models.Model):
    # stores only numbers, strings, lists, dicts (but not dates)
    basic_data = JSONField()

    # stores datetime, namedtuple, set, decimal, complex...
    rich_data = JSONPlusField()

GitHub Stars

12

LAST COMMIT

3yrs ago

MAINTAINERS

1

CONTRIBUTORS

2

OPEN ISSUES

3

OPEN PRs

0
VersionTagPublished
0.1.3
4yrs ago
0.1.2
4yrs ago
0.1.1
5yrs ago
0.1.0
5yrs ago
No alternatives found
No tutorials found
Add a tutorial