dfsjson-1.1.2
توضیحات
A robust JSON encoder that fixes errors by utilizing DFS algorithm.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | dfsjson-1.1.2 |
| نام | dfsjson |
| نسخه کتابخانه | 1.1.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Unsal Gokdag |
| ایمیل نویسنده | unsal.gokdag@gmail.com |
| آدرس صفحه اصلی | https://github.com/AutomaticHourglass/dfsjson |
| آدرس اینترنتی | https://pypi.org/project/dfsjson/ |
| مجوز | - |
# DFS JSON
A Depth First Search powered JSON decoding library. For the remaining operations (dump, dumps), it uses standard python JSON library.
# Installation
```
pip install dfsjson
```
# Usage
```
# Create a complex JSON object
example_json = """{
"key1": "value1'
"key2": [1 2, 3]
"key3": {
"subkey1": "subvalue1"
"subkey2": "subvalue2"
,
}"""
dj = DFSJson(max_depth = 100, max_diff = 10)
dj.loads(example_json)
```
# Discussion
### Hey I know this. Why not have you used Breadth First Search?
Technically you are correct but keep in mind that Breadth First Search keeps the previous states in its list which
scales with number of iterations you are making and it can be a huge strain on the memory.
However, Depth First search requires only O(log(n)) memory complexity in which we can search a lot more possibilities.
# Contribution
Please don't hesitate to create issues and pull requests since this is developed overnight.
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl dfsjson-1.1.2:
pip install dfsjson-1.1.2.whl
نصب پکیج tar.gz dfsjson-1.1.2:
pip install dfsjson-1.1.2.tar.gz