{ "info": { "author": "Rainy Chan", "author_email": "rainydew@qq.com", "bugtrack_url": null, "classifiers": [], "description": "Deep_Json_Compare\r\n=================\r\n\r\nA library to compare any json string/json-like objects.\r\n\r\nFeatures\r\n--------\r\n\r\n- Compare jsons and print the differences (and where they are,\r\n recursion supported). Useful for interface testing.\r\n- Ignore the order of items in a list or not, recursively.\r\n- Both python 27 and 36 supported.\r\n- Regular expression supported for string to skip unconcerned keys or\r\n just to assert the format.\r\n- Compact **string** and **unicode** (or **bytes** and **str** in\r\n python3), they are considered equal. Good for non ascii coding\r\n languages.\r\n- Support tuples, so results from pymysql.cursors.DictCursor can\r\n compare with interface response directly.\r\n- Json type legal check.\r\n- Support skipping anywhere using argument like *ignore_path=[\u201c/a/1/k\u201d,\r\n \u201c/a/1/l\u201d]*, dict keys or list indexes. Skipped fields are regarded as\r\n match. (New)\r\n\r\nQuickStart\r\n----------\r\n\r\n.. code:: shell\r\n\r\n pip install deepjsoncompare\r\n\r\n.. code:: python\r\n\r\n from json_compare import Jcompare\r\n cp=Jcompare()\r\n print(cp.compare({\"key1\":[\"v1\",\"v2\"],\"key2\":{\"key3\":1}},{\"key1\":[\"v2\",\"v1\"],\"key2\":{\"key3\":2}}))\r\n\r\nto see\r\n\r\n::\r\n\r\n a is {'key2': {'key3': 1}, 'key1': ['v1', 'v2']}\r\n b is {'key2': {'key3': 2}, 'key1': ['v2', 'v1']}\r\n ignore_list_seq = True, re_compare = True\r\n different value at /key2/key3\r\n a: 1\r\n b: 2\r\n False\r\n\r\nfor more demo and information, just install it and visit the test file\r\n**test_json_compare.py** in **Your Python\r\nPath/Lib/site-packages/deepjsoncompare/**\r\n\r\nSmall Hints\r\n-----------\r\n\r\n- Datetime in SQL result is not JSON serializable type, use something\r\n like *CAST(create_time as CHAR) \u2018create_time\u2019* in SQL statement to\r\n solve it.\r\n\r\nTodo\r\n----\r\n\r\n- Fuzzy equal when handling floats.\r\n\r\nBug report\r\n----------\r\n\r\n- Issues and bug reports to rainydew@qq.com.\r\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://rainydew.blog.csdn.net/article/details/93904318", "keywords": "json compare comparison order unicode fuzzy", "license": "", "maintainer": "", "maintainer_email": "", "name": "deepjsoncompare", "package_url": "https://pypi.org/project/deepjsoncompare/", "platform": "", "project_url": "https://pypi.org/project/deepjsoncompare/", "project_urls": { "Homepage": "https://rainydew.blog.csdn.net/article/details/93904318" }, "release_url": "https://pypi.org/project/deepjsoncompare/1.12/", "requires_dist": null, "requires_python": "", "summary": "(deprecated, moved to ) A recursive Json comparing library that handles list orders and fuzzy types", "version": "1.12" }, "last_serial": 5530418, "releases": { "1.12": [ { "comment_text": "", "digests": { "md5": "8bac89e70015c67f1203ac4157fc5a03", "sha256": "0edd888d94bc565afe7a71d0dbda183f6c7bd6a798dd32f58ced1c92549b6d26" }, "downloads": -1, "filename": "deepjsoncompare-1.12.tar.gz", "has_sig": false, "md5_digest": "8bac89e70015c67f1203ac4157fc5a03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6544, "upload_time": "2019-07-14T08:53:25", "url": "https://files.pythonhosted.org/packages/e1/83/41216891a22d63568edb22e7542e5995a4271f91cfa4a9021404dcb7ab0f/deepjsoncompare-1.12.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8bac89e70015c67f1203ac4157fc5a03", "sha256": "0edd888d94bc565afe7a71d0dbda183f6c7bd6a798dd32f58ced1c92549b6d26" }, "downloads": -1, "filename": "deepjsoncompare-1.12.tar.gz", "has_sig": false, "md5_digest": "8bac89e70015c67f1203ac4157fc5a03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6544, "upload_time": "2019-07-14T08:53:25", "url": "https://files.pythonhosted.org/packages/e1/83/41216891a22d63568edb22e7542e5995a4271f91cfa4a9021404dcb7ab0f/deepjsoncompare-1.12.tar.gz" } ] }