Name | json-with-decimals JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | A fork of Python's built-in JSON module, but with added support for decimal.Decimal objects |
upload_time | 2024-05-12 13:40:43 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | None |
keywords |
json
decimal
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
A fork of Python's built-in JSON module, but with added support for decimal.Decimal objects.
Install using:
```
pip install json_with_decimals
```
Similar to the proposal given in [this issue](https://github.com/python/cpython/issues/118810).
By default, decoded JSON will return decimal.Decimal objects for real numbers, and the encoder supports decimal.Decimal numbers.
Encoding decimals will disable the speedup from the C encoder, so you can temporarily disable decimal support with the `support_decimal` keyword argument:
```py
import json_with_decimals as json
json.dumps(obj, support_decimal=False)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "json-with-decimals",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "json, decimal",
"author": null,
"author_email": "Christopher Ashford <christopherash0605@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/43/3d/fc8a459077276fe003895bc595cbb4c7911d8e05777691903e7b1b63bcbc/json_with_decimals-0.1.0.tar.gz",
"platform": null,
"description": "A fork of Python's built-in JSON module, but with added support for decimal.Decimal objects.\r\n\r\nInstall using:\r\n```\r\npip install json_with_decimals\r\n```\r\n\r\nSimilar to the proposal given in [this issue](https://github.com/python/cpython/issues/118810).\r\n\r\nBy default, decoded JSON will return decimal.Decimal objects for real numbers, and the encoder supports decimal.Decimal numbers.\r\n\r\nEncoding decimals will disable the speedup from the C encoder, so you can temporarily disable decimal support with the `support_decimal` keyword argument:\r\n```py\r\nimport json_with_decimals as json\r\njson.dumps(obj, support_decimal=False)\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A fork of Python's built-in JSON module, but with added support for decimal.Decimal objects",
"version": "0.1.0",
"project_urls": {
"repository": "https://github.com/Kris-0605/json_with_decimals"
},
"split_keywords": [
"json",
" decimal"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "07e50aa4c2f1374996afc3bdc1f836526cb26afc7ea8aa520ed4da3b57cfdc13",
"md5": "8fffb589659ddc026519005ddd345bce",
"sha256": "1ec15f130482904fe421da658ed12590802bc3b5c695a2a5f7a85c400ed21a71"
},
"downloads": -1,
"filename": "json_with_decimals-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8fffb589659ddc026519005ddd345bce",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 20578,
"upload_time": "2024-05-12T13:40:40",
"upload_time_iso_8601": "2024-05-12T13:40:40.919310Z",
"url": "https://files.pythonhosted.org/packages/07/e5/0aa4c2f1374996afc3bdc1f836526cb26afc7ea8aa520ed4da3b57cfdc13/json_with_decimals-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "433dfc8a459077276fe003895bc595cbb4c7911d8e05777691903e7b1b63bcbc",
"md5": "02023af71247cedd1ad463c39826aef8",
"sha256": "eb10896fcdbe32faeba095a9ec9fac71d03382d95431e900e7d6d2809f9d1f62"
},
"downloads": -1,
"filename": "json_with_decimals-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "02023af71247cedd1ad463c39826aef8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18120,
"upload_time": "2024-05-12T13:40:43",
"upload_time_iso_8601": "2024-05-12T13:40:43.092721Z",
"url": "https://files.pythonhosted.org/packages/43/3d/fc8a459077276fe003895bc595cbb4c7911d8e05777691903e7b1b63bcbc/json_with_decimals-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-12 13:40:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Kris-0605",
"github_project": "json_with_decimals",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "json-with-decimals"
}