{ "info": { "author": "Nikita Grishko", "author_email": "gr1n@protonmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# json-ext-encoder [![Build Status](https://travis-ci.org/Gr1N/json-ext-encoder.svg?branch=master)](https://travis-ci.org/Gr1N/json-ext-encoder) [![codecov](https://codecov.io/gh/Gr1N/json-ext-encoder/branch/master/graph/badge.svg)](https://codecov.io/gh/Gr1N/json-ext-encoder) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\nExtended JSON encoder for Python data structures.\n\nA subclass of [JSONEncoder](https://docs.python.org/3/library/json.html#json.JSONEncoder), it handles these additional types:\n\n- `datetime.datetime` \u2014 a string of the form `YYYY-MM-DDTHH:mm:ss.sssZ` or `YYYY-MM-DDTHH:mm:ss.sss+HH:MM` as defined in [ECMA-262](https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15).\n- `datetime.date` \u2014 a string of the form `YYYY-MM-DD` as defined in [ECMA-262](https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15).\n- `datetime.time` \u2014 a string of the form `HH:MM:ss.sss` as defined in [ECMA-262](https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15).\n- `datetime.timedelta` - a string representing a duration as defined in [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html). For example, `timedelta(days=1, hours=2, seconds=3.4)` is represented as `P1DT02H00M03.400000S`.\n- `decimal.Decimal`, `uuid.UUID` \u2014 a string representation of the object.\n- `enum.Enum` \u2014 a `.value` property of enum member.\n\n## Installation\n\n $ pip install json-ext-encoder\n\n## Usage\n\n import json\n from json_ext_encoder import JSONEncoder\n\n json.dumps({...}, cls=JSONEncoder)\n\n## Contributing\n\nTo work on the `json-ext-encoder` codebase, you'll want to clone the project locally and install the required dependencies via [poetry](https://poetry.eustace.io):\n\n $ git clone git@github.com:Gr1N/json-ext-encoder.git\n $ poetry install\n\nTo run tests and linters use command below:\n\n $ poetry run tox\n\nIf you want to run only tests or linters you can explicitly specify which test environment you want to run, e.g.:\n\n $ poetry run tox -e py37-tests\n\n## License\n\n`json-ext-encoder` is licensed under the MIT license. See the license file for details.\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Gr1N/json-ext-encoder", "keywords": "json,encoder,serialization", "license": "MIT", "maintainer": "Nikita Grishko", "maintainer_email": "gr1n@protonmail.com", "name": "json-ext-encoder", "package_url": "https://pypi.org/project/json-ext-encoder/", "platform": "", "project_url": "https://pypi.org/project/json-ext-encoder/", "project_urls": { "Homepage": "https://github.com/Gr1N/json-ext-encoder" }, "release_url": "https://pypi.org/project/json-ext-encoder/0.2.0/", "requires_dist": null, "requires_python": ">=3.6,<4.0", "summary": "Extended JSON encoder for Python data structures", "version": "0.2.0" }, "last_serial": 4035578, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9d2adc0cea15359d568a45f374edfec8", "sha256": "b1bbc78b8a321ba28d5d018d7170178fad3b6b8f3c03c2ca3bcccf4fa20cbd75" }, "downloads": -1, "filename": "json_ext_encoder-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9d2adc0cea15359d568a45f374edfec8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3805, "upload_time": "2018-05-17T14:47:56", "url": "https://files.pythonhosted.org/packages/99/94/8e42341a77a3f7dff6a8cf60254c578ed9386e60d31dbc26d16a995503b4/json_ext_encoder-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f64b2065dd702ad11fadd456259cb92", "sha256": "2ea47b75310e7c0697abe27604803311f4a1bb93db882ce94903e01c7a5e4ec6" }, "downloads": -1, "filename": "json-ext-encoder-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5f64b2065dd702ad11fadd456259cb92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3464, "upload_time": "2018-05-17T14:47:54", "url": "https://files.pythonhosted.org/packages/ad/cc/d0df90b08b0e06afb36709e7f69e3676ad16231906bcc9c8eccaf5d44a60/json-ext-encoder-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6696de4b9da2d37bb6b7baa6ad44e6d4", "sha256": "699a0c8efd4e1af1e6cc737f9ed06dd6acc8d5028605e5b2a016d841d9c439a5" }, "downloads": -1, "filename": "json_ext_encoder-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6696de4b9da2d37bb6b7baa6ad44e6d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 6338, "upload_time": "2018-07-06T07:02:09", "url": "https://files.pythonhosted.org/packages/54/3d/5372d4cd790a35be371c90359cea9683aacd7d4e6415fa849ae97d679381/json_ext_encoder-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "896064cbbe880048f78874bf4cbc8dcd", "sha256": "bafb5834e513814134679c52c6b7c8f757cb055fbaa020d0e0659c64a086a013" }, "downloads": -1, "filename": "json-ext-encoder-0.2.0.tar.gz", "has_sig": false, "md5_digest": "896064cbbe880048f78874bf4cbc8dcd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 3812, "upload_time": "2018-07-06T07:02:08", "url": "https://files.pythonhosted.org/packages/f3/b9/2b5d6013063c1d7463d58c1a90de50c03fd93a2fa530bf8758ac5511c0bf/json-ext-encoder-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6696de4b9da2d37bb6b7baa6ad44e6d4", "sha256": "699a0c8efd4e1af1e6cc737f9ed06dd6acc8d5028605e5b2a016d841d9c439a5" }, "downloads": -1, "filename": "json_ext_encoder-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6696de4b9da2d37bb6b7baa6ad44e6d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 6338, "upload_time": "2018-07-06T07:02:09", "url": "https://files.pythonhosted.org/packages/54/3d/5372d4cd790a35be371c90359cea9683aacd7d4e6415fa849ae97d679381/json_ext_encoder-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "896064cbbe880048f78874bf4cbc8dcd", "sha256": "bafb5834e513814134679c52c6b7c8f757cb055fbaa020d0e0659c64a086a013" }, "downloads": -1, "filename": "json-ext-encoder-0.2.0.tar.gz", "has_sig": false, "md5_digest": "896064cbbe880048f78874bf4cbc8dcd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 3812, "upload_time": "2018-07-06T07:02:08", "url": "https://files.pythonhosted.org/packages/f3/b9/2b5d6013063c1d7463d58c1a90de50c03fd93a2fa530bf8758ac5511c0bf/json-ext-encoder-0.2.0.tar.gz" } ] }