Skip to content

merge_patch: inconsistent behaviour merging empty sub-object #1289

Description

@adam-p

When using merge_patch with an object like {{"k", {}}}, different results are obtained than with other methods for providing an empty object.

Example: https://wandbox.org/permlink/7SDUyC98tSZX7sPL

Like...

start with: {"k":{"a":"b"}}

merge_patch({{"k", json({})}}) --> {"k":{"a":"b"}}

merge_patch({{"k", {}}}) --> {}

It may be that I'm confused about what {} means here. If it's equivalent to null, then I think this makes sense. But I don't see anything in the README about that being the case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions