{ "info": { "author": "Martin Vejn\u00e1r", "author_email": "vejnar.martin@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries" ], "description": "# pycson\n\n[![Build Status](https://travis-ci.org/avakar/pycson.svg?branch=master)](https://travis-ci.org/avakar/pycson)\n\nA python parser for the Coffeescript Object Notation (CSON).\n\n## Installation\n\nThe parser is tested on Python 2.7 and 3.5.\n\n pip install cson\n\nThe interface is the same as for the standard `json` package.\n\n >>> import cson\n >>> cson.loads('a: 1')\n {'a': 1}\n >>> with open('file.cson', 'rb') as fin:\n ... obj = cson.load(fin)\n >>> obj\n {'a': 1}\n\n## The language\n\nThere is not formal definition of CSON, only an informal note in [one project][1]'s readme.\nInformally, CSON is a JSON, but with a Coffeescript syntax. Sadly [Coffescript][2] has no\nformat grammar either; it instead has a canonical implementation.\n\nThis means that bugs in the implementation translate into bugs in the language itself.\n\nWorse, this particular implementation inserts a \"rewriter\" between the typical\nlexer/parser pair, purporting that it makes the grammar simpler. Unfortunately, it adds\nweird corner cases to the language..\n\nThis parser does away with the corner cases,\nin exchange for changing the semantics of documents in a few unlikely circumstances.\nIn other words, some documents may be parsed differently by the Coffescript parser and pycson.\n\nHere are some important highlights (see the [formal grammar][3] for details).\n\n* String interpolations (`\"#{test}\"`) are allowed, but are treated literally.\n* Whitespace is ignored in arrays and in objects enclosed in braces\n (Coffeescripts requires consistent indentation).\n* Unbraced objects greedily consume as many key/value pairs as they can.\n* All lines in an unbraced object must have the same indentation. This is the only place\n where whitespace is significant. There are no special provisions for partial dedents.\n For two lines to have the same indent, their maximal sequences of leading spaces and tabs\n must be the same (Coffescript only tracks the number of whitespace characters).\n* Unbraced objects that don't start on their own line will never span multiple lines.\n* Commas at the end of the line can always be removed without changing the output.\n\nI believe the above rules make the parse unambiguous.\n\nThis example demonstrates the effect of indentation.\n\n # An array containing a single element: an object with three keys.\n [\n a: 1\n b: 2\n c: 3\n ]\n\n # An array containing three elements: objects with one key.\n [\n a: 1\n b: 2\n c: 3\n ]\n\n # An array containing two objects, the first of which having one key.\n [ a: 1\n b: 2\n c: 3 ]\n\nNote that pycson can parse all JSON documents correctly (Coffeescript can't because\nof whitespace and string interpolations).\n\n [1]: https://github.com/bevry/cson\n [2]: http://coffeescript.org/\n [3]: grammar.md\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/avakar/pycson", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cson", "package_url": "https://pypi.org/project/cson/", "platform": "", "project_url": "https://pypi.org/project/cson/", "project_urls": { "Homepage": "https://github.com/avakar/pycson" }, "release_url": "https://pypi.org/project/cson/0.8/", "requires_dist": null, "requires_python": "", "summary": "A parser for Coffeescript Object Notation (CSON)", "version": "0.8" }, "last_serial": 4727288, "releases": { "0.1.0": [], "0.1.1": [ { "comment_text": "", "digests": { "md5": "de9f1bcf144a8c66c7602163a8615da4", "sha256": "8cbdf42d84ec21fb1b12caf6a6b49ceb09c3313d85b2bfe42d7e0933cd548671" }, "downloads": -1, "filename": "cson-0.1.1.zip", "has_sig": false, "md5_digest": "de9f1bcf144a8c66c7602163a8615da4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4168, "upload_time": "2015-10-25T13:31:01", "url": "https://files.pythonhosted.org/packages/41/7e/aa69ea0c17802798ef68cbc7d460f201f973f4a4b4c83be523e1aa92156c/cson-0.1.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "8394deacee68fd8ffc8146423b63b979", "sha256": "2d48c372c94528e5041f579650cfca1029697f2ac38a2b5821f850a62338f3f9" }, "downloads": -1, "filename": "cson-0.2.zip", "has_sig": false, "md5_digest": "8394deacee68fd8ffc8146423b63b979", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4790, "upload_time": "2015-11-09T23:12:02", "url": "https://files.pythonhosted.org/packages/01/ba/c16ffd99fa73ad06f6f19df546160a883a564727d9f6af3b8d6ccdecc3f6/cson-0.2.zip" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "8fb6cc39aa53cb2368627e56abcdc977", "sha256": "6bfbc6e692b101afa87f5202ff3bdd186bb107cfd1d3e2ebc0c1bd92e518b0fe" }, "downloads": -1, "filename": "cson-0.3.zip", "has_sig": false, "md5_digest": "8fb6cc39aa53cb2368627e56abcdc977", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4941, "upload_time": "2015-11-12T20:16:39", "url": "https://files.pythonhosted.org/packages/3b/98/767acbc216259081388084966bfb283a2ebd05da3f9daaffe51fc081ad61/cson-0.3.zip" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "5f0d78f4691d234f95cfed545622880f", "sha256": "6505cbc4cdb8d7de7e694e05fc2274bf2e78d9c762e8fd1bc88298fae9587cf6" }, "downloads": -1, "filename": "cson-0.4.zip", "has_sig": false, "md5_digest": "5f0d78f4691d234f95cfed545622880f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4913, "upload_time": "2015-11-15T22:26:32", "url": "https://files.pythonhosted.org/packages/01/35/de516fad688821e149f08ee174e248acab8f2b32e069806067ec13adbda1/cson-0.4.zip" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "d730fa7a01d92b414d394218aabd93d9", "sha256": "9cdc12e26ad182b715549680555c09b54aadcc0e4e2508980bdfa3ea9889ce9a" }, "downloads": -1, "filename": "cson-0.5.zip", "has_sig": false, "md5_digest": "d730fa7a01d92b414d394218aabd93d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5409, "upload_time": "2016-07-05T11:23:47", "url": "https://files.pythonhosted.org/packages/83/08/04d79fe3b51b25c506926cdfedcfd0b9f419c1174933b63dff4b6b553fab/cson-0.5.zip" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "cc86ebfb36b621b13319ab3a4d204dc1", "sha256": "16c8a8080b5b9197b166bc159a1969afae89ba10889fc04926376cbb2acbee04" }, "downloads": -1, "filename": "cson-0.6.zip", "has_sig": false, "md5_digest": "cc86ebfb36b621b13319ab3a4d204dc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5410, "upload_time": "2016-07-07T10:19:32", "url": "https://files.pythonhosted.org/packages/04/4e/0492684f78eacd1f0d5bfd9757a52d3ff6ee2b5da9fe96d4e95536bf020d/cson-0.6.zip" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "40f16d4b4d8f7070afbb1220ff1a27d8", "sha256": "c923819ea207e10fd7e58de2920fa621af04be67c307fc2efa36402b253e33a0" }, "downloads": -1, "filename": "cson-0.7.zip", "has_sig": false, "md5_digest": "40f16d4b4d8f7070afbb1220ff1a27d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5426, "upload_time": "2016-07-22T18:38:31", "url": "https://files.pythonhosted.org/packages/78/8a/3996fefb3dd2df391aca5faf1558e1e6d8bb46e5f4caa92f39ab2e58eab0/cson-0.7.zip" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "67750c758df3f03a335c9e5e0f97a6cc", "sha256": "163a18fccbb5bd0911d20f0ef5876ce5a08057b05ba212571579578f292ed100" }, "downloads": -1, "filename": "cson-0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "67750c758df3f03a335c9e5e0f97a6cc", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 6721, "upload_time": "2019-01-22T18:00:43", "url": "https://files.pythonhosted.org/packages/99/6f/0a83b553bee55baa2ee3a039c6d91c339beca59d250ad742053dcf83ac26/cson-0.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "02f738b7f765e88b4222fe2126a685db", "sha256": "ee8c0166fcd1f51789887197e3e8354ac7befa396fc29706bceb5af25edc9e01" }, "downloads": -1, "filename": "cson-0.8.tar.gz", "has_sig": false, "md5_digest": "02f738b7f765e88b4222fe2126a685db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6346, "upload_time": "2019-01-22T18:00:41", "url": "https://files.pythonhosted.org/packages/8c/14/461bdde1d712dae3c14e139dd4b37085085fd75f01d44f888767bfc6d313/cson-0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "67750c758df3f03a335c9e5e0f97a6cc", "sha256": "163a18fccbb5bd0911d20f0ef5876ce5a08057b05ba212571579578f292ed100" }, "downloads": -1, "filename": "cson-0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "67750c758df3f03a335c9e5e0f97a6cc", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 6721, "upload_time": "2019-01-22T18:00:43", "url": "https://files.pythonhosted.org/packages/99/6f/0a83b553bee55baa2ee3a039c6d91c339beca59d250ad742053dcf83ac26/cson-0.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "02f738b7f765e88b4222fe2126a685db", "sha256": "ee8c0166fcd1f51789887197e3e8354ac7befa396fc29706bceb5af25edc9e01" }, "downloads": -1, "filename": "cson-0.8.tar.gz", "has_sig": false, "md5_digest": "02f738b7f765e88b4222fe2126a685db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6346, "upload_time": "2019-01-22T18:00:41", "url": "https://files.pythonhosted.org/packages/8c/14/461bdde1d712dae3c14e139dd4b37085085fd75f01d44f888767bfc6d313/cson-0.8.tar.gz" } ] }