-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
unflatten
vs objects with number-ish keys
#1575
Comments
Good point! This should go into the documentation. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I think it would be helpful if there was a way to override the
output:
|
As the flatten and in particular the unflatten function are not really standardized, one could think about adding a parameter to not interpret numbers as strings. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The documentation for
flatten
andunflatten
should point out that JSON pointers as per RFC 6901 do not distinguish between arrays, and objects with number-ish strings as keys. There should also be a note about howunflatten
decides whether to make an array or an object (e.g., it might just look at the first pointer, it might look at all of them, what happens for path elements like1.0
,010
, or1E1
).is actually
flattens to
and that unflattens to
The text was updated successfully, but these errors were encountered: