How to convert to a dict when needed?
Closed this issue · 2 comments
pushshift commented
What is the best way to convert to a dict? I tried dict(obj) and was able to get a dict but some keys are still things like <cysimdjson.cysimdjson.JSONArray object at 0x7f523a0ff090>
Would creating a method to recursively go through the fields and convert be the best method or is there a built-in method to convert a JSON with nested fields / arrays into a dict? I understand the sacrifice in speed but we would only be doing this with JSON objects that match a specific key value within the JSON.
Thanks so much for this amazing module! It is amazingly fast.
TkTech commented
You're looking for export()
.
pushshift commented
Thank you sir!