{ "info": { "author": "reorx", "author_email": "novoreorx@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.7" ], "description": "An extension for JSON to support file inclusion\n===============================================\n\njson-include is an extended way for JSON to support file inclusion, it has two parts:\n\n1. A syntax definition called **include syntax**.\n\n2. A Python implementation to parse and build JSON file that contains **include syntax**.\n\n\nSyntax\n------\n\njson-include supports an extended syntax called **include syntax** in JSON,\nformatted as:\n\n.. code-block:: json\n\n {\n \"...\": \"\"\n }\n\nThe include syntax means that this object (the whole ``{\"...\": \"\"}``) in JSON\nis a reference to the JSON file named in ```` notation,\nand should be included into its place.\n\nThe included JSON should always be an object (dict) rather than an array (list),\nto prevent implicit meaning and make sure we can get a clear view of the structure\nwithout looking into the included JSON files.\n\nIn a normal JSON when we want to include another JSON on an attribute, it should\nbe written as follows:\n\n.. code-block:: json\n\n {\n \"username\": \"alice\",\n \"profile\": {\n \"...\": \"\"\n }\n }\n\nIn this JSON a ``profile_model.json`` is included to present ``profile`` attribute,\nif the content of ``profile_model.json`` is like:\n\n.. code-block:: json\n\n {\n \"age\": 18,\n \"gender\": \"female\"\n }\n\nthen what we mean by the include syntax is that, when this JSON is being used\nas a normal JSON, it should be seen as:\n\n.. code-block:: json\n\n {\n \"username\": \"alice\",\n \"profile\": {\n \"age\": 18,\n \"gender\": \"female\"\n }\n }\n\nTo ture JSON with include syntax into a normal JSON, a build process is needed,\nthat's what the implementation does.\n\nPython Implementation\n---------------------\n\nImplementation could be of any language as long as it can understand the include syntax\nand output as expected, this repo contains a Python implementation for use.\n\nInstallation\n~~~~~~~~~~~~\n\n::\n\n pip install json-include\n\nUsage\n~~~~~\n\nBy installation a command called ``json-include`` will be registerd as an entry point,\nuse it as follows::\n\n usage: json-include [-h] DIR FILE\n\n Command line tool to build JSON file by include syntax.\n\n positional arguments:\n DIR The directory path of source json files\n FILE The name of the source json file\n\n optional arguments:\n -h, --help show this help message and exit\n\nFor example::\n\n json-include test/source_json/ c.json\n\nThe parsed and built result of ``c.json`` will be printed.\n\nFurther usage of ``json_include`` package is documented in its source code,\nand ``test/`` can also give you better understandings of how it works.\n\nTODOs\n-----\n\n- [ ] Prevent circluar inclusion\n- [ ] Test circluar inclusion\n- [ ] Test invalid syntax", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/reorx/json_include", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "json-include", "package_url": "https://pypi.org/project/json-include/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/json-include/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/reorx/json_include" }, "release_url": "https://pypi.org/project/json-include/0.1.4/", "requires_dist": null, "requires_python": null, "summary": "An extension for JSON to support file including", "version": "0.1.4" }, "last_serial": 2281487, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "8a73876a9494dfdf6c6f9bd07c198c8b", "sha256": "b7aa5775216c2af5516ebabdcc6a2d4e75eaccb75c0616b1a8960272fcc7d849" }, "downloads": -1, "filename": "json-include-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8a73876a9494dfdf6c6f9bd07c198c8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3141, "upload_time": "2015-04-28T16:38:04", "url": "https://files.pythonhosted.org/packages/53/e0/f7c342c8ff20fde79775eb83154a8dbaad55c3600aa9c8c42c57f82f3d77/json-include-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b80862338b3365d60f3a8c15858dd599", "sha256": "f8e7abd3d2e384e5cb7ee3e4338604d254e61e18016334ae5aaded3bcc628fd4" }, "downloads": -1, "filename": "json-include-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b80862338b3365d60f3a8c15858dd599", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3530, "upload_time": "2015-04-28T17:02:11", "url": "https://files.pythonhosted.org/packages/5e/f7/6bcbeae4cb07647d82d0aa23b25103750f231f6b5aa82abb4afc23d9b28f/json-include-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "3efdc24c8258a7a8349046abdbf81c94", "sha256": "d57ff4208bbfc24353e732d782f9f5a2d9cf1eb862b42c35792e56a9a88a6e66" }, "downloads": -1, "filename": "json-include-0.1.2.tar.gz", "has_sig": false, "md5_digest": "3efdc24c8258a7a8349046abdbf81c94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3526, "upload_time": "2015-04-28T17:05:13", "url": "https://files.pythonhosted.org/packages/9d/c6/c2d22f57a85f81878ca7152141c9318e1bbb881dd813e64f4826bfcb1ef6/json-include-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "cf9373f46f1663116991c5e2fe858558", "sha256": "6f39d043fdf88ea542b9e5ccb27366dbc239b4e8adb183d82507627b19c44c0a" }, "downloads": -1, "filename": "json-include-0.1.3.tar.gz", "has_sig": false, "md5_digest": "cf9373f46f1663116991c5e2fe858558", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3777, "upload_time": "2015-04-28T17:13:06", "url": "https://files.pythonhosted.org/packages/11/b6/beca28956f05de0aef64e6b877ae86680c46298167268cc06d4102f586d7/json-include-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "e57d92b3464969ffceda6ec857d9d624", "sha256": "8c0eb7aa1aabde2807a08ee2cccfe8c11d90e9fab44e1a12c83c920291468876" }, "downloads": -1, "filename": "json_include-0.1.4-py2-none-any.whl", "has_sig": false, "md5_digest": "e57d92b3464969ffceda6ec857d9d624", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5918, "upload_time": "2016-08-15T04:54:24", "url": "https://files.pythonhosted.org/packages/c8/b0/a0108d3babb701cdf60a29d9c3114514c5ffe9a56820ee91b18d076c62eb/json_include-0.1.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "66d71d5bfbb8c5937d734bafb0ce2f88", "sha256": "e1c3879f8d27d4dd25003dd4fea392f640ad21be1f837ef8a243842e36588632" }, "downloads": -1, "filename": "json-include-0.1.4.tar.gz", "has_sig": false, "md5_digest": "66d71d5bfbb8c5937d734bafb0ce2f88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3832, "upload_time": "2016-08-15T04:54:21", "url": "https://files.pythonhosted.org/packages/8a/29/d92c9d1974023986b7369829acf734c953c9e8a284ec533450c58dcbf3aa/json-include-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e57d92b3464969ffceda6ec857d9d624", "sha256": "8c0eb7aa1aabde2807a08ee2cccfe8c11d90e9fab44e1a12c83c920291468876" }, "downloads": -1, "filename": "json_include-0.1.4-py2-none-any.whl", "has_sig": false, "md5_digest": "e57d92b3464969ffceda6ec857d9d624", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5918, "upload_time": "2016-08-15T04:54:24", "url": "https://files.pythonhosted.org/packages/c8/b0/a0108d3babb701cdf60a29d9c3114514c5ffe9a56820ee91b18d076c62eb/json_include-0.1.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "66d71d5bfbb8c5937d734bafb0ce2f88", "sha256": "e1c3879f8d27d4dd25003dd4fea392f640ad21be1f837ef8a243842e36588632" }, "downloads": -1, "filename": "json-include-0.1.4.tar.gz", "has_sig": false, "md5_digest": "66d71d5bfbb8c5937d734bafb0ce2f88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3832, "upload_time": "2016-08-15T04:54:21", "url": "https://files.pythonhosted.org/packages/8a/29/d92c9d1974023986b7369829acf734c953c9e8a284ec533450c58dcbf3aa/json-include-0.1.4.tar.gz" } ] }