Skip to content

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

@maca

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]}]

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions