{ "info": { "author": "C. Foster", "author_email": "korewananda@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "[![Build Status](https://travis-ci.org/NouberNou/jsonjsc.svg?branch=master)](https://travis-ci.org/NouberNou/jsonjsc)\n[![PyPI version fury.io](https://badge.fury.io/py/jsonjsc.svg)](https://pypi.python.org/pypi/jsonjsc/)\n[![GitHub license](https://img.shields.io/github/license/NouberNou/jsonjsc.svg)](https://github.com/NouberNou/jsonjsc/blob/master/LICENSE)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/jsonjsc.svg)](https://pypi.python.org/pypi/jsonjsc/)\n\n\n# jsonjsc\nA Python library for parsing out C/Javascript style comments in JSON files.\n\n## Install\n\n`pip install jsonjsc`\n\n## Features\n1. Simple and easy to use library with no other dependencies.\n1. Supports C/JS block (`/* */`) and single line (`//`) comments.\n1. Retains the line number and character column of JSON content after parsing, letting syntax error positions get properly reported by the normal Python JSON decoder.\n1. Is easily dropped into existing JSON library usage as a decoder class.\n1. Test backed via `unittest`.\n\n## Example\n```python\nimport json\nimport jsonjsc\n\nTEST_JSON_DECODER = r'''{\n /*\n This is a test of the JSON decoder in full\n */\n \"test1\": \"message1\", // this comment should parse out.\n\n // \"junk1\": \"message\",\n\n /*\n \"junk2\": \"another message\",\n */\n\n \"test2\": \"message2\"\n}'''\n\ntest = json.loads(TEST_JSON_DECODER, cls=jsonjsc.JSONCommentDecoder)\n\nprint(test[\"test1\"])\n\nif \"junk1\" not in test:\n print(\"I guess junk1 was commented out?\")\n\nif \"junk2\" not in test:\n print(\"I guess junk2 was commented out too!\")\n\nprint(test[\"test2\"])\n```\n\n## TODOs\n\nImplementation could probably be sped up significantly as it uses character by character searches to test if comments are in string values or not. No performance metrics have been taken.\n\n## License\n\nLicensed under the MIT License. See LICENSE for more information.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/NouberNou/jsonjsc", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "jsonjsc", "package_url": "https://pypi.org/project/jsonjsc/", "platform": "", "project_url": "https://pypi.org/project/jsonjsc/", "project_urls": { "Homepage": "https://github.com/NouberNou/jsonjsc" }, "release_url": "https://pypi.org/project/jsonjsc/1.1.2/", "requires_dist": null, "requires_python": "", "summary": "A package to parse out C/JS style block and single line comments from JSON files", "version": "1.1.2" }, "last_serial": 4060132, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "9c522c8b83886273fce146e84fd4a76e", "sha256": "4974c5f5bb24e98a09bdfc8e2ded1df13b0dce674389e9aa753050b604def14b" }, "downloads": -1, "filename": "jsonjsc-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9c522c8b83886273fce146e84fd4a76e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4255, "upload_time": "2018-07-09T01:59:44", "url": "https://files.pythonhosted.org/packages/c0/f6/073ec9ea9d0cc0f05f262da1a8aab438ea1d8ac152e8a476c0210bbccbf5/jsonjsc-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8945a9ee29760d2c7eface1f825409b9", "sha256": "0d0642fa7a12f88b7bfd2e4857a55702f843f19dbfb4cd84a62d91efb7ef0c73" }, "downloads": -1, "filename": "jsonjsc-1.0.0.tar.gz", "has_sig": false, "md5_digest": "8945a9ee29760d2c7eface1f825409b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3212, "upload_time": "2018-07-09T01:59:45", "url": "https://files.pythonhosted.org/packages/5d/fb/9dd74450fde71bcb983f4726e83fd3ea6955bc3df7d0065e2e0698e8f923/jsonjsc-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "43fb30fba6f8c40d738c333d33005c98", "sha256": "a1b85d0b202f25ec4517606ea38ca145928e14019c268020409948b17c394c07" }, "downloads": -1, "filename": "jsonjsc-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "43fb30fba6f8c40d738c333d33005c98", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4466, "upload_time": "2018-07-09T02:39:33", "url": "https://files.pythonhosted.org/packages/9b/fe/55027235dbb6b6b0c7b0f82c525621b3cde91b52d9612f40b320414c2b54/jsonjsc-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "be3eda080051043b1096533926ad1c66", "sha256": "11ac9415581618b1c7065b19570c22049b96c092c24ce539dc86f55d6198727a" }, "downloads": -1, "filename": "jsonjsc-1.1.0.tar.gz", "has_sig": false, "md5_digest": "be3eda080051043b1096533926ad1c66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3480, "upload_time": "2018-07-09T02:39:34", "url": "https://files.pythonhosted.org/packages/e7/45/98b82a1262f30fd54011f6654c5a18aefbd180250ab214f3abfc2ee51a75/jsonjsc-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "7b175b784d05984dedee12ef45dc4e92", "sha256": "96ab8366eafbbdac99aaf73fbc5911e1724649d325c58ccd0b3468dae6c3db2b" }, "downloads": -1, "filename": "jsonjsc-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7b175b784d05984dedee12ef45dc4e92", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4597, "upload_time": "2018-07-09T03:43:10", "url": "https://files.pythonhosted.org/packages/ec/96/1997720254a78d67553d3998d3101dec435e8735ec8383aa5a0329d0b004/jsonjsc-1.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "267518f816896b1b138bbc2968e1d6e0", "sha256": "453e981b8f4367662e2b56ecb343ef009482dc82fca00cc5abcbfca2ed723542" }, "downloads": -1, "filename": "jsonjsc-1.1.1.tar.gz", "has_sig": false, "md5_digest": "267518f816896b1b138bbc2968e1d6e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3611, "upload_time": "2018-07-09T03:43:11", "url": "https://files.pythonhosted.org/packages/fd/8b/7b650dd450d4b3428a01b35b6f325e39040efcaf90b2a108577243440849/jsonjsc-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "546d2355b44ad4085658eedfcd789468", "sha256": "f6a232848c7b305749229e40dec2ba7ea711ebd4565bcdacbadfa46b04e12b1b" }, "downloads": -1, "filename": "jsonjsc-1.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "546d2355b44ad4085658eedfcd789468", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4637, "upload_time": "2018-07-13T23:30:40", "url": "https://files.pythonhosted.org/packages/36/1a/dd3a0bf204903c34a68feac0550931b89ad85eb33804aff87a18aa007b6c/jsonjsc-1.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20ff7f7889982ff99ba09732132f90ba", "sha256": "57028b6f732448b9f9c7c3d764cd6fedad26825a3c912abd71f5a5fea97feb31" }, "downloads": -1, "filename": "jsonjsc-1.1.2.tar.gz", "has_sig": false, "md5_digest": "20ff7f7889982ff99ba09732132f90ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3639, "upload_time": "2018-07-13T23:30:42", "url": "https://files.pythonhosted.org/packages/d3/5f/8ff1c4e1117b6e314b8d7f1a86a2a1da199123a2b89855b736539c6f1098/jsonjsc-1.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "546d2355b44ad4085658eedfcd789468", "sha256": "f6a232848c7b305749229e40dec2ba7ea711ebd4565bcdacbadfa46b04e12b1b" }, "downloads": -1, "filename": "jsonjsc-1.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "546d2355b44ad4085658eedfcd789468", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4637, "upload_time": "2018-07-13T23:30:40", "url": "https://files.pythonhosted.org/packages/36/1a/dd3a0bf204903c34a68feac0550931b89ad85eb33804aff87a18aa007b6c/jsonjsc-1.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20ff7f7889982ff99ba09732132f90ba", "sha256": "57028b6f732448b9f9c7c3d764cd6fedad26825a3c912abd71f5a5fea97feb31" }, "downloads": -1, "filename": "jsonjsc-1.1.2.tar.gz", "has_sig": false, "md5_digest": "20ff7f7889982ff99ba09732132f90ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3639, "upload_time": "2018-07-13T23:30:42", "url": "https://files.pythonhosted.org/packages/d3/5f/8ff1c4e1117b6e314b8d7f1a86a2a1da199123a2b89855b736539c6f1098/jsonjsc-1.1.2.tar.gz" } ] }