{ "info": { "author": "SevenQuark", "author_email": "info@sevenquark.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: BSD License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: Jython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Object Brokering", "Topic :: System :: Distributed Computing" ], "description": "# About json-mapper\n\nPackage for map and parse JSON text to python dict.\n\nFor example, to bring to readable form of responses from the Rest API.\n\n# Usage example\n\nSuppose we have such a terrible JSON dump:\n\n```python\n{\n \"ApiResponse\": {\n \"ApiResponseWrapper\": {\n \"HotelsResponse\": [\n {\n \"Country\": \"Russia\", \n \"HotelId\": \"1234\", \n \"HotelName\": \"Space Hotel\", \n \"Photos\": [\n {\n \"BigUrl\": \"http://www.image.url.com\", \n \"ThumbnailUrl\": \"http://www.image.url.com\"\n }, \n ... other photos ...\n ], \n \"RoomsResponse\": [\n {\n \"BedsCount\": \"1\", \n \"RoomId\": \"12312\"\n }, \n ... other rooms ...\n ]\n }, \n ... other hotels ...\n ], \n \"ResponseTimestamp\": \"2342423423423423\", \n \"SessionId\": \"0ABAA840-F6EC-6913-A1C2-7341899060B6\"\n },\n \"SomeProperty\": \"SomeData\"\n }\n}\n``` \n\nExample to map the his pretty:\n\n```python\nimport json\nfrom json_mapper.mapper import map_json\n\njson_data = json.loads(open('dump.json').read())\n\nmapping_config = {\n 'ApiResponse.ApiResponseWrapper': {\n 'ResponseTimestamp': 'last_update',\n\n '{loop=>hotels} HotelsResponse': {\n 'HotelId': 'id',\n 'Country': 'country',\n\n '{loop=>photos} Photos': 'BigUrl',\n\n '{loop=>rooms} RoomsResponse': {\n 'RoomId': 'id',\n 'BedsCount': 'beds'\n }\n }\n }\n}\n\nresult = map_json(mapping_config, json_data)\n\n>>> pprint(result)\n{'hotels': [{'country': u'Russia',\n 'id': u'1234',\n 'photos': [u'http://www.image.url.com',\n u'http://www.image.url.com'],\n 'rooms': [{'beds': u'1', 'id': u'12312'},\n {'beds': u'1', 'id': u'12312'}]},\n {'country': u'Russia',\n 'id': u'1234',\n 'photos': [u'http://www.image.url.com',\n u'http://www.image.url.com'],\n 'rooms': [{'beds': u'1', 'id': u'12312'},\n {'beds': u'1', 'id': u'12312'}]}],\n 'last_update': u'2342423423423423'}\n ```\n\n See full example in tests directory.", "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/SevenQuark/json-mapper", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "json-mapper", "package_url": "https://pypi.org/project/json-mapper/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/json-mapper/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/SevenQuark/json-mapper" }, "release_url": "https://pypi.org/project/json-mapper/0.1.15/", "requires_dist": null, "requires_python": null, "summary": "Map and parse JSON text to python dict", "version": "0.1.15" }, "last_serial": 793802, "releases": { "0.1.1": [ { "comment_text": "built for Linux-3.2.0-29-generic-x86_64-with-glibc2.7", "digests": { "md5": "32cc556b2dfc57bccb11017d637ba052", "sha256": "fdbcf1ded78ef1adfd72edb5d949596ef406f5e8cf641788739dba6ce2dc5efc" }, "downloads": -1, "filename": "json-mapper-0.1.1.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "32cc556b2dfc57bccb11017d637ba052", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 5105, "upload_time": "2012-10-19T15:29:37", "url": "https://files.pythonhosted.org/packages/9a/49/5e374eceecf636c9aca3e7fdfd7955f6a3348ad8be79e9b0629fd935f32b/json-mapper-0.1.1.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "0dd6db6a03f20bf3b04d67275cd29220", "sha256": "b2ca44525d506708aaf7591b4e3a0cd6afb9dd3da19fbc8ed46e0837c9ed520c" }, "downloads": -1, "filename": "json-mapper-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0dd6db6a03f20bf3b04d67275cd29220", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3659, "upload_time": "2012-10-19T15:29:35", "url": "https://files.pythonhosted.org/packages/47/10/37237fecfbe47383689a0747d2ffd52870a8d9bf817ce7381feef6b09ec8/json-mapper-0.1.1.tar.gz" } ], "0.1.10": [ { "comment_text": "", "digests": { "md5": "37f3ecc97b713894b37ac4f230d1e7e2", "sha256": "3144415ff8a70a811ef159f2ad2fa504daf0cc2c8187164847a4fa3343842ec9" }, "downloads": -1, "filename": "json-mapper-0.1.10.tar.gz", "has_sig": false, "md5_digest": "37f3ecc97b713894b37ac4f230d1e7e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4302, "upload_time": "2012-10-25T15:46:27", "url": "https://files.pythonhosted.org/packages/c4/7a/c9a5954e8d4dde4ed56606835d9c6ffd1fc685078fb74a6aaeaf49e12aa9/json-mapper-0.1.10.tar.gz" } ], "0.1.11": [ { "comment_text": "", "digests": { "md5": "c506e924bc66ff502d39f5c2fc29e671", "sha256": "72599de559615b912754d9e027b2e8884cae108a54eedfe8c75d862d92670649" }, "downloads": -1, "filename": "json-mapper-0.1.11.tar.gz", "has_sig": false, "md5_digest": "c506e924bc66ff502d39f5c2fc29e671", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4298, "upload_time": "2012-10-25T16:18:16", "url": "https://files.pythonhosted.org/packages/bd/56/e4265935e2ad0396b532ba04a154d760dc097ac9f4592f30bd7c61d7f1e3/json-mapper-0.1.11.tar.gz" } ], "0.1.12": [ { "comment_text": "", "digests": { "md5": "98950aa1d588dc356eeee22a4947655f", "sha256": "0b31e55e3350057d2eedb03eed33b0b0a87d9e538771fb9924be4fd1895e3817" }, "downloads": -1, "filename": "json-mapper-0.1.12.tar.gz", "has_sig": false, "md5_digest": "98950aa1d588dc356eeee22a4947655f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4317, "upload_time": "2012-10-25T16:20:42", "url": "https://files.pythonhosted.org/packages/35/80/494b9ece7533ab76a6eb32574bab42619d41db06d5ec35428693ea816678/json-mapper-0.1.12.tar.gz" } ], "0.1.13": [ { "comment_text": "", "digests": { "md5": "05cefca80844871233cedefa74b5b942", "sha256": "640afa65f1acfe7e18898fe21bf8c0b98ba8ad6cb5b9286023ce57cba7f71073" }, "downloads": -1, "filename": "json-mapper-0.1.13.tar.gz", "has_sig": false, "md5_digest": "05cefca80844871233cedefa74b5b942", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4316, "upload_time": "2012-10-25T16:21:55", "url": "https://files.pythonhosted.org/packages/eb/39/a2e2fe757af6c35fe285e26ac1dadf3495d06243a25940570626c04cae33/json-mapper-0.1.13.tar.gz" } ], "0.1.14": [ { "comment_text": "", "digests": { "md5": "99745bed8a6867cccc9918c276db221e", "sha256": "cd83a07d2e3eb18cfdbedc03617d8d307d9d2cd7a5fa830f22b114e3611c80bf" }, "downloads": -1, "filename": "json-mapper-0.1.14.tar.gz", "has_sig": false, "md5_digest": "99745bed8a6867cccc9918c276db221e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4333, "upload_time": "2012-10-26T14:44:04", "url": "https://files.pythonhosted.org/packages/76/d3/496cf1904641d77aa946a8b5f9d8432166477b2c133e5ce0ab26ce1c78c4/json-mapper-0.1.14.tar.gz" } ], "0.1.15": [ { "comment_text": "", "digests": { "md5": "5a9fa532bf792a549b6152e4faec6f13", "sha256": "3fbe6f73e950b78b398b44b702342b2a7c55573b2471c63d801ec9a8a9e30dc2" }, "downloads": -1, "filename": "json-mapper-0.1.15.tar.gz", "has_sig": false, "md5_digest": "5a9fa532bf792a549b6152e4faec6f13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4338, "upload_time": "2012-10-26T15:32:33", "url": "https://files.pythonhosted.org/packages/f9/63/60bfc68587216774a788e31f87cbbe81e478a09abbf1afad28ee8dc4c08d/json-mapper-0.1.15.tar.gz" } ], "0.1.2": [ { "comment_text": "built for Linux-3.2.0-29-generic-x86_64-with-glibc2.7", "digests": { "md5": "df402a60d86fb4bfa415cfa79efa7650", "sha256": "db9baee70255574df692e303059b4587ad9a81eb8107dac7ca7e679c9542f827" }, "downloads": -1, "filename": "json-mapper-0.1.2.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "df402a60d86fb4bfa415cfa79efa7650", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 6275, "upload_time": "2012-10-19T15:32:05", "url": "https://files.pythonhosted.org/packages/95/ac/fcec5ea5133797cb98d7bf3de85eea47c39d0ed72c97dfff24b6938d3ed4/json-mapper-0.1.2.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "8cee2235a2b79f41d8829aa746229749", "sha256": "e3f258229791e0f30e11b958eb909774bc49c7c324af548d944d69887bee580d" }, "downloads": -1, "filename": "json-mapper-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8cee2235a2b79f41d8829aa746229749", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4076, "upload_time": "2012-10-19T15:32:03", "url": "https://files.pythonhosted.org/packages/8d/09/8c666a14c7775b41cb697b4a662c13e06c88ffcce57fca9d36c6da89cab8/json-mapper-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "d41c450b239066f82ec9596c8b816b8d", "sha256": "5bb0347437d42dc93c97ec3a0ad19c4da997677a086639e29be65a9a05ecaa7f" }, "downloads": -1, "filename": "json-mapper-0.1.3.tar.gz", "has_sig": false, "md5_digest": "d41c450b239066f82ec9596c8b816b8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4078, "upload_time": "2012-10-19T15:32:21", "url": "https://files.pythonhosted.org/packages/48/c9/cf5753ef48903da2303aa4130dfd1920cd869a6711712aa3f95a7f7f635c/json-mapper-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "73aea9da9660b77bcb1a3dca7996d094", "sha256": "df247881c91483c139796da7d578884fac0c5d0e153b6d4a3ffdf50dacc29b8e" }, "downloads": -1, "filename": "json-mapper-0.1.4.tar.gz", "has_sig": false, "md5_digest": "73aea9da9660b77bcb1a3dca7996d094", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4081, "upload_time": "2012-10-19T15:35:29", "url": "https://files.pythonhosted.org/packages/f6/0b/089fe8b138e1565a1527cf119c8d2e7c18c469a7b065617128197d3c52a7/json-mapper-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "3dddbc33ac29e2eaa2a09a17d37d56c6", "sha256": "6ffc99dc8ec24640a331b31c3e563b5eed8ad7c5e0d72c41f48f50f279010234" }, "downloads": -1, "filename": "json-mapper-0.1.5.tar.gz", "has_sig": false, "md5_digest": "3dddbc33ac29e2eaa2a09a17d37d56c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4109, "upload_time": "2012-10-19T15:37:19", "url": "https://files.pythonhosted.org/packages/93/bf/3b9e912463565b2268975010b429bee19f7f2302bb4e2cb3799d8c1add32/json-mapper-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "a8e82309a20b4ef4533dd8461d7f5b6b", "sha256": "6974c2721a17cfda82674c241ffc7def4cbf7278906c9aeeb7db8ec000ec4345" }, "downloads": -1, "filename": "json-mapper-0.1.6.tar.gz", "has_sig": false, "md5_digest": "a8e82309a20b4ef4533dd8461d7f5b6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4261, "upload_time": "2012-10-25T09:38:39", "url": "https://files.pythonhosted.org/packages/eb/67/6500cd2da86bb00e4312d95952db1587d5325f3b2a7e1b90b776418aa11b/json-mapper-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "7107fe99decdf0e601b1be2b8295223a", "sha256": "04569c00eb6055ca3c5587bada56ddeb4acb36519eea97a1bab57ce823386cc0" }, "downloads": -1, "filename": "json-mapper-0.1.7.tar.gz", "has_sig": false, "md5_digest": "7107fe99decdf0e601b1be2b8295223a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4258, "upload_time": "2012-10-25T14:45:33", "url": "https://files.pythonhosted.org/packages/dd/d6/9e37a82e57d334e8fcaff4262cb98cfa0caba69c382e6dc1a571460ecbea/json-mapper-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "8c8193b95d7e26e578391f148bcb2df8", "sha256": "242976af1947ac13a29e709439f6db122d0e1a60347e430d961e72e55ef53a7f" }, "downloads": -1, "filename": "json-mapper-0.1.8.tar.gz", "has_sig": false, "md5_digest": "8c8193b95d7e26e578391f148bcb2df8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4275, "upload_time": "2012-10-25T14:57:00", "url": "https://files.pythonhosted.org/packages/96/e6/6171a068bd6058934794ddcd71ca61bf3490de5b5be4fd738a2cf707e07a/json-mapper-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "d4da5a2ba8478e48bbcda42f1a93f62f", "sha256": "238a87daf6b29af23193a91d4e5371b226754eb69bed6d8ccf36cabf5213da9b" }, "downloads": -1, "filename": "json-mapper-0.1.9.tar.gz", "has_sig": false, "md5_digest": "d4da5a2ba8478e48bbcda42f1a93f62f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4286, "upload_time": "2012-10-25T15:23:29", "url": "https://files.pythonhosted.org/packages/ab/96/bdf744edb6a523b5630d25f52c13080d33a53df98b87673f3ae5711dd8a9/json-mapper-0.1.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5a9fa532bf792a549b6152e4faec6f13", "sha256": "3fbe6f73e950b78b398b44b702342b2a7c55573b2471c63d801ec9a8a9e30dc2" }, "downloads": -1, "filename": "json-mapper-0.1.15.tar.gz", "has_sig": false, "md5_digest": "5a9fa532bf792a549b6152e4faec6f13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4338, "upload_time": "2012-10-26T15:32:33", "url": "https://files.pythonhosted.org/packages/f9/63/60bfc68587216774a788e31f87cbbe81e478a09abbf1afad28ee8dc4c08d/json-mapper-0.1.15.tar.gz" } ] }