Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link

Description

@crowfrog
Issue body actions

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().

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.