Skip to content
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

jsonparser.Delete has different behaviors when key found/not found in json #229

Open
crowfrog opened this issue Apr 19, 2021 · 0 comments
Open

Comments

@crowfrog
Copy link

when key found in JSON, Delete() will make a new slice and return it with new content.
when key not found in JSON, Delete() will return the original slice.

For API user, it is very hard to diff these two cases and make following actions if we want to apply new actions on new slice but not impact original content.
If API user make a new slice and copy result of Delete() in it to apply new actions. That means we will take two alloc/copy if the key found in JSON, one by API user and one by Delete().

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

No branches or pull requests

1 participant