Skip to content

Wrong patch when substituting an object for an array? #31

Description

@maca
> jsonpatch.compare({a: {}}, {a: [1]});
[{op: "add", path: "/a/0", value: 1}]

Shouldn't be the empty object replaced with the array? the value is no longer an object.

[{op: "replace", path: "/a", value: [1]}]

Activity

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions