Metadata-Version: 2.1
Name: dfsjson
Version: 1.0.1
Summary: A robust JSON encoder that fixes errors by utilizing DFS algorithm.
Author: Unsal Gokdag
Author-email: unsal.gokdag@gmail.com
Requires-Python: >=3.6,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/markdown

# DFS JSON
A Depth First Search powered JSON encoding 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"
    ,
}"""

rj = DFSJson(max_depth = 100, max_diff = 10)
rj.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.
