-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Question about flatten and unflatten #1989
Copy link
Copy link
Closed
Labels
kind: questionstate: help neededthe issue needs help to proceedthe issue needs help to proceedstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated
Metadata
Metadata
Assignees
Labels
kind: questionstate: help neededthe issue needs help to proceedthe issue needs help to proceedstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated
I had tested that
j.flatten() == j_flattenis true andj_flatten.unflatten() == jis false.From the source code, it might just look at the first pointer - if there is a
"0"reference_token, it will start a new array. And the behavior will cause that under the following cases, we cannot useunflatten():when calling
unflatten(),[json.exception.parse_error.109] parse error: array index 't' is not a numberwill be raised.