JuanjoSalvador / NyaaPy

Unofficial Python wrapper for Nyaa anime torrent sites
MIT License
48 stars 23 forks source link

Return JSON objects instead of dictionaries #1

Closed JuanjoSalvador closed 7 years ago

JuanjoSalvador commented 7 years ago

My first idea was convert XML to JSON, but for this purpose.

XML > dictionary > JSON

This seems a good idea:

o = xmltodict.parse('<e> <a>text</a> <a>text</a> </e>')
json.dumps(o) # '{"e": {"a": ["text", "text"]}}'
JuanjoSalvador commented 7 years ago

Instead of JSON, it is better to return an array of dicts