-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle keys that look like integers #17
Comments
idk if this issue is related to the #48 issue referenced but, I am also observing this issue. I think the root of the problem is because of the way list indexes are flat packed.
is flat packed as:
Which is identical to the way the following dict would also be packed:
Which again is flat packed as:
and so both of these flat packed formats are unpacked into the same structure (NOT desired, as you can see we started with 2 very different JSONs/dicts) Maybe this could be solved by changing how list item indexes are flat packed? I have seen other libraries use this format Though the above approach creates another bug if implemented because then what do you do if the original dict looks like this?
^ This may be an acceptable bug until someone figures out how to fix that edge case though as I think mixing up list indexes and keys named just |
I had to flatten and then unflatten json which had arrays and also some keys of the form "0", "1" (strings with numbers). I hacked on the code a bit disambiguate arrays from these keys by adding a "@", but the way I did it breaks backward compatibility. Here it is for reference:
yzadik@3302f14
The text was updated successfully, but these errors were encountered: