You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import json_flatten
json_flatten.flatten([{'name': 'john'}])
{'[0].name': 'john'}
res = json_flatten.flatten([{'name': 'john'}])
json_flatten.unflatten(res)
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/json_flatten.py", line 127, in unflatten
if list(obj.keys()) == [""]:
AttributeError: 'list' object has no attribute 'keys'
The text was updated successfully, but these errors were encountered:
This library wasn't designed to handle lists as the lowest level element.
Having thought about it bit... I think I'm OK with that restriction, but it needs to return a better error message and be mentioned in the documentation.
Hi,
Seeing this error for the json [{'name': 'john'}]
The text was updated successfully, but these errors were encountered: