close
Skip to content

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

Description

@crowfrog

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

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