{ "info": { "author": "Ratson", "author_email": "contact@ratson.name", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": "dj-jsonfield\n===================\n\nWhy fork\n--------\n\nThis is a fork of `django-jsonfield`_.\nI need to use `django-jsonfield`_ with `jsonfield`_.\nUnfortunately, both have been using the same package name ``jsonfield``,\nso I have to maintain a fork.\n\nDifference from upstream\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Rename package name from ``jsonfield`` to ``dj_jsonfield``.\n\n.. _django-jsonfield: https://bitbucket.org/schinckel/django-jsonfield\n.. _jsonfield: https://github.com/bradjasper/django-jsonfield/\n\nIntroduction\n------------\n\nI had a serious need for a JSON field for django. There were a couple out\nthere, but none packaged up nicely on bitbucket/github that were usable\nwith ``pip install -e``.\n\nSo I took the code from `David Cramer's blog`_, and packaged it up.\n\nUsage\n-----\n\nTo use, just install the package, and then use the field::\n\n from django.db import models\n import dj_jsonfield\n\n class MyModel(models.Model):\n the_json = dj_jsonfield.JSONField()\n\nYou can assign any JSON-encodable object to this field. It will be\nJSON-encoded before being stored in the database as a text value and it\nwill be turned back into a python list/dict/string upon retrieval from the\ndatabase.\n\nThere is also a ``TypedJSONField``, that allows you to define data types that must be included within each object in the array. More documentation to follow.\n\n\nNotes\n~~~~~\n\nIf no ``default`` is provided, and ``null=True`` is not passed in to the\nfield constructor, then a default of ``{}`` will be used.\n\n\nSupported django versions\n-------------------------\n\nAll versions of Django from 1.8 onwards are tested, however, if you are using Postgres, I highly recommend that you consider using the ``django.contrib.postgres`` module's ``JSONField`` instead.\n\nExtras\n------\n\njsonify templatetag\n~~~~~~~~~~~~~~~~~~~\nThis allows you to convert a python data structure into JSON within a template::\n\n {% load jsonify %}\n\n \n\nNote that you must only use the \"safe\" filter when you use the jsonify\nfilter within a