Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Add Python and JavaScript style comments in your JSON files.

Project Description
===========
commentjson
===========

`commentjson` (Comment JSON) is a Python package that helps you create JSON
files with Python and JavaScript style inline comments. Its API is very similar
to the Python standard library's `json`_ module.

.. _`json`: http://docs.python.org/2/library/json.html

.. image:: https://travis-ci.org/vaidik/commentjson.png

Installation
============

pip install commentjson

Basic Usage
===========

.. code-block:: python

>>> import commentjson
>>>
>>> json_string = """{
... "name": "Vaidik Kapoor", # Person's name
... "location": "Delhi, India", // Person's location
...
... # Section contains info about
... // person's appearance
... "appearance": {
... "hair_color": "black",
... "eyes_color": "black",
... "height": "6"
... }
... }"""
>>>
>>> json_loaded = commentjson.loads(json_string)
>>> print json_loaded
{u'appearance': {u'eyes_color': u'black', u'hair_color': u'black', u'height': u'6'}, u'name': u'Vaidik Kapoor', u'location': u'Delhi, India'}

Documentation
=============

Complete documentation can be found `here`_.

.. _`here`: http://commentjson.readthedocs.org/en/latest/

Tests
=====

python setup.py test

License
=======

See `license`_.

.. _`license`: https://github.com/vaidik/commentjson/blob/master/LICENSE.rst
Release History

Release History

This version
History Node

0.6

History Node

0.5

History Node

0.4

History Node

0.3

History Node

0.2.6

History Node

0.2.5

History Node

0.2.4

History Node

0.2.2

History Node

0.2.1

History Node

0.2

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
commentjson-0.6.tar.gz (4.0 kB) Copy SHA256 Checksum SHA256 Source Aug 26, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting