Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

output parameters must be ordered as keys #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leonardoce
Copy link

The existing implementation of UJObjectUnpack writes to the output parameters as soon as it finds the corresponding element in the objObj.
In my opinion it should use the order sent by the user in the _keyNames argument because, otherwise, the meaning of the output parameters changes when the order of the keys in the JSON input changes. Key order should not alter meaning of JSON objects.

I know that this patch alters the meaning of the programs that are already using this function so, if you find it more fair, I can also add a function with a different name.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant