{ "info": { "author": "Julien Duponchelle", "author_email": "julien@duponchelle.info", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "============\nJSON API Doc\n============\n\n\n.. image:: https://img.shields.io/pypi/v/json-api-doc.svg\n :target: https://pypi.python.org/pypi/json-api-doc\n\n.. image:: https://img.shields.io/travis/noplay/json-api-doc.svg\n :target: https://travis-ci.org/noplay/json-api-doc\n\n.. image:: https://readthedocs.org/projects/json-api-doc/badge/?version=latest\n :target: https://json-api-doc.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n\n.. image:: https://pyup.io/repos/github/noplay/json-api-doc/shield.svg\n :target: https://pyup.io/repos/github/noplay/json-api-doc/\n :alt: Updates\n\n\n\nThis library provides ability to transform between normalized JSON API\n(http://jsonapi.org/) documents and denormalized Python dictionary object for\neasier manipulation in code.\nAlso available as a command line utility and Python 3 module.\n\nDeserialization\n~~~~~~~~~~~~~~~\n\nFor this JSON API document:\n\n.. code-block:: json\n\n {\n \"data\": [{\n \"type\": \"articles\",\n \"id\": \"1\",\n \"attributes\": {\n \"title\": \"JSON API paints my bikeshed!\",\n \"body\": \"The shortest article. Ever.\",\n \"created\": \"2015-05-22T14:56:29.000Z\",\n \"updated\": \"2015-05-22T14:56:28.000Z\"\n },\n \"relationships\": {\n \"author\": {\n \"data\": {\"id\": \"42\", \"type\": \"people\"}\n }\n }\n }],\n \"included\": [\n {\n \"type\": \"people\",\n \"id\": \"42\",\n \"attributes\": {\n \"name\": \"John\",\n \"age\": 80,\n \"gender\": \"male\"\n }\n }\n ]\n }\n\nThe simplified version will be:\n\n.. code-block:: json\n\n [\n {\n \"type\": \"articles\",\n \"id\": \"1\",\n \"title\": \"JSON API paints my bikeshed!\",\n \"body\": \"The shortest article. Ever.\",\n \"created\": \"2015-05-22T14:56:29.000Z\",\n \"updated\": \"2015-05-22T14:56:28.000Z\",\n \"author\": {\n \"type\": \"people\",\n \"id\": \"42\",\n \"name\": \"John\",\n \"age\": 80,\n \"gender\": \"male\"\n }\n }\n ]\n\nSerialization\n~~~~~~~~~~~~~\n\nTo turn an dict into JSON API specification document the root of your object\nmust contain a `$type` key with a value corresponding to the name of\nthe object's resource type. Any sub-dict or sub-array of dicts that also\ncontain a `$type` key will be considered an included documents and serialized\naccordingly.\n\n.. code-block:: json\n\n [\n {\n \"$type\": \"articles\",\n \"id\": \"1\",\n \"title\": \"JSON API paints my bikeshed!\",\n \"body\": \"The shortest article. Ever.\",\n \"created\": \"2015-05-22T14:56:29.000Z\",\n \"updated\": \"2015-05-22T14:56:28.000Z\",\n \"author\": {\n \"$type\": \"people\",\n \"id\": \"42\",\n \"name\": \"John\",\n \"age\": 80,\n \"gender\": \"male\"\n }\n }\n ]\n\n.. code-block:: json\n\n {\n \"data\": [{\n \"type\": \"articles\",\n \"id\": \"1\",\n \"attributes\": {\n \"title\": \"JSON API paints my bikeshed!\",\n \"body\": \"The shortest article. Ever.\",\n \"created\": \"2015-05-22T14:56:29.000Z\",\n \"updated\": \"2015-05-22T14:56:28.000Z\"\n },\n \"relationships\": {\n \"author\": {\n \"data\": {\"id\": \"42\", \"type\": \"people\"}\n }\n }\n }],\n \"included\": [\n {\n \"type\": \"people\",\n \"id\": \"42\",\n \"attributes\": {\n \"name\": \"John\",\n \"age\": 80,\n \"gender\": \"male\"\n }\n }\n ]\n }\n\nUsage as python module\n----------------------\n\n.. code-block:: python\n\n import json_api_doc\n\n document = {\n 'data': {\n 'type': 'article',\n 'id': '1',\n 'attributes': {\n 'name': 'Article 1'\n }\n }\n }\n json_api_doc.deserialize(document)\n\n.. code-block:: python\n\n import json_api_doc\n\n document = {\n '$type': 'article',\n 'id': '1',\n 'name': 'Article 1'\n }\n json_api_doc.serialize(document)\n\nUsage as cli\n------------\n\n.. code-block:: bash\n\n $ jsonapidoc document.json\n\n\nContributors\n-------------\n* Julien Duponchelle (https://github.com/noplay)\n* Antonio Martinovi\u0107 (https://github.com/TopHatCroat)\n* Jeff Zellman (https://github.com/jzellman)\n* Brenda Deely (https://github.com/brendadeely)\n\nLicence\n--------\nFree software: Apache Software License 2.0\n\nDocumentation\n--------------\nFull Documentation is available: https://json-api-doc.readthedocs.io.\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/noplay/json-api-doc", "keywords": "json api", "license": "Apache Software License 2.0", "maintainer": "", "maintainer_email": "", "name": "json-api-doc", "package_url": "https://pypi.org/project/json-api-doc/", "platform": "", "project_url": "https://pypi.org/project/json-api-doc/", "project_urls": { "Homepage": "https://github.com/noplay/json-api-doc" }, "release_url": "https://pypi.org/project/json-api-doc/0.9.0/", "requires_dist": null, "requires_python": "", "summary": "JSON API to document parser", "version": "0.9.0" }, "last_serial": 5838016, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "fc2f70e934f156c48d7ab0f4b0680608", "sha256": "0550328c91b86f5bddd6295b375ec5dc36f37bfe1f3eeffa43ff2b09eba6cde6" }, "downloads": -1, "filename": "json_api_doc-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fc2f70e934f156c48d7ab0f4b0680608", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3785, "upload_time": "2018-05-18T19:50:01", "url": "https://files.pythonhosted.org/packages/fe/24/7e0f0602dc1209af785a7d1940dcff665d9fef4429a6965e46610c91680a/json_api_doc-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "34845abca07d116d439748a12dc8ce59", "sha256": "70ec9b4b06200fc16280fdb527f9163ae02c0b0b44c6bbf55ca145adc363b4b5" }, "downloads": -1, "filename": "json-api-doc-0.1.0.tar.gz", "has_sig": false, "md5_digest": "34845abca07d116d439748a12dc8ce59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3564, "upload_time": "2018-05-18T19:50:01", "url": "https://files.pythonhosted.org/packages/f9/85/5abf9ea77fa41ad46f64a398c55d9b046ed6e14b40566f7ff90ac606abca/json-api-doc-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "90ed6ff672bbc71d8694624b0c78724a", "sha256": "bf4edf3dda1f7f98311d577d7836bb296bc49768397b14d4d2e720a360bd8316" }, "downloads": -1, "filename": "json_api_doc-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "90ed6ff672bbc71d8694624b0c78724a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3786, "upload_time": "2018-05-20T19:47:10", "url": "https://files.pythonhosted.org/packages/ab/98/9076cca646cb98fab336baa06a52543e4df2d798ec229d71534eee1228e4/json_api_doc-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "648d39e798e5eb805d718958c1eb601a", "sha256": "c9f9a1ad3c287723ae755c0695360115cec5cd0cd46f045abbad7e7649f2f8e8" }, "downloads": -1, "filename": "json-api-doc-0.2.0.tar.gz", "has_sig": false, "md5_digest": "648d39e798e5eb805d718958c1eb601a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3561, "upload_time": "2018-05-20T19:47:11", "url": "https://files.pythonhosted.org/packages/0a/4c/682465d12f88088055c152290573eca8f777c3514543b6ec0483a9c2d140/json-api-doc-0.2.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "39f468514dffd13fa1511ec2e95a37d5", "sha256": "69768d40a481470ed9c9cd48f0a053bfc722bfedba144f9ce89171b0f17ea91c" }, "downloads": -1, "filename": "json_api_doc-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "39f468514dffd13fa1511ec2e95a37d5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4359, "upload_time": "2019-01-06T21:32:27", "url": "https://files.pythonhosted.org/packages/c5/77/d993b4b9c4e4b14c7ad8b7a9a85af078eb401928fe94dca31a02ae7de534/json_api_doc-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3f7cc79080fffe1db0b3b1c5fc1b7802", "sha256": "8e2981e97b4d0b8a998eeb114a6ceeff22f0b6beeb6e43a5a833161e7a5123a5" }, "downloads": -1, "filename": "json-api-doc-0.4.0.tar.gz", "has_sig": false, "md5_digest": "3f7cc79080fffe1db0b3b1c5fc1b7802", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3584, "upload_time": "2019-01-06T21:30:47", "url": "https://files.pythonhosted.org/packages/9d/7d/66759a95ad1b33cbad27e0f38395d8270aded9e863df3799134844670f1d/json-api-doc-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "c5dcd241c6b458ee2b8d0429e73b4816", "sha256": "82e9f2241f080a0654ea5f2e2c9612710a9d253b43d8bcb5a5c06e890bcbbbfa" }, "downloads": -1, "filename": "json-api-doc-0.5.0.tar.gz", "has_sig": false, "md5_digest": "c5dcd241c6b458ee2b8d0429e73b4816", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3584, "upload_time": "2019-03-08T21:09:40", "url": "https://files.pythonhosted.org/packages/3f/a4/55cef14d55b33f40bb425937905e63e7c170a78c9f50816eb579679d8cb1/json-api-doc-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "c8382272cda043135102805dda942e69", "sha256": "c54a7f78d0fb1869232a52d7019456da41424b20bc0271054240cf85be506911" }, "downloads": -1, "filename": "json_api_doc-0.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c8382272cda043135102805dda942e69", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4364, "upload_time": "2019-03-08T21:08:23", "url": "https://files.pythonhosted.org/packages/72/54/65cdf0553731c17fb133b6f06bc2bf4a3b2ce642b4cdd0eb09d92eefb5d4/json_api_doc-0.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "07c19ee699c34d3b69363e815fd80e12", "sha256": "e63f32170fa197c02177cf1ff8c2d79f12ee045a2f48a02b749351d820f94881" }, "downloads": -1, "filename": "json-api-doc-0.6.0.tar.gz", "has_sig": false, "md5_digest": "07c19ee699c34d3b69363e815fd80e12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3570, "upload_time": "2019-03-08T21:08:25", "url": "https://files.pythonhosted.org/packages/73/fa/ebd1fdc46c6fb71888d6bfa49ad5cec2b1a9ac66384da6236d5fb8352bd6/json-api-doc-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "46aad8831e16a5106f2518a1342b7617", "sha256": "352c465037bc6b82261e8a5ab5c6c550b4dcad5da7f4a3f74e8125768c47a962" }, "downloads": -1, "filename": "json-api-doc-0.7.0.tar.gz", "has_sig": false, "md5_digest": "46aad8831e16a5106f2518a1342b7617", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4837, "upload_time": "2019-04-07T08:01:05", "url": "https://files.pythonhosted.org/packages/6f/70/72f5fbab24dc5fed7b49e6e3f28c953c35cff5b70390ed432cb9fe47e48c/json-api-doc-0.7.0.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "38099c3abc2e4d3843365ee243d9d594", "sha256": "3cae87ccbbd7b2354c86627572b8538170d27f26f5bea6206ac182de79c365fc" }, "downloads": -1, "filename": "json-api-doc-0.8.0.tar.gz", "has_sig": false, "md5_digest": "38099c3abc2e4d3843365ee243d9d594", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4940, "upload_time": "2019-09-01T08:30:06", "url": "https://files.pythonhosted.org/packages/ef/b1/6e092d058412f00275e31db6f35232ab0c1df5fb3b53fbcfdcc26b7bb77c/json-api-doc-0.8.0.tar.gz" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "f88340f5bae9094fb11f84aa22d37a70", "sha256": "3b233f1bba860d15024fba51ba91adf2783513aa721003e611ced7b72b4453df" }, "downloads": -1, "filename": "json-api-doc-0.9.0.tar.gz", "has_sig": false, "md5_digest": "f88340f5bae9094fb11f84aa22d37a70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4958, "upload_time": "2019-09-16T20:05:26", "url": "https://files.pythonhosted.org/packages/28/f8/5c85fd4f3e5d4bebdc347c98f67df067bd9ff6471f8239f5b6272d39494b/json-api-doc-0.9.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f88340f5bae9094fb11f84aa22d37a70", "sha256": "3b233f1bba860d15024fba51ba91adf2783513aa721003e611ced7b72b4453df" }, "downloads": -1, "filename": "json-api-doc-0.9.0.tar.gz", "has_sig": false, "md5_digest": "f88340f5bae9094fb11f84aa22d37a70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4958, "upload_time": "2019-09-16T20:05:26", "url": "https://files.pythonhosted.org/packages/28/f8/5c85fd4f3e5d4bebdc347c98f67df067bd9ff6471f8239f5b6272d39494b/json-api-doc-0.9.0.tar.gz" } ] }