File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -42,12 +42,12 @@ On construction `JsonDiff` will build `rearranged` value of `new` recursively ke
4242Keys that are missing in ` original ` will be appended to the end of ` rearranged ` value in same order they had in ` new ` value.
4343
4444If two values are arrays of objects, ` JsonDiff ` will try to find a common unique field in those objects and use it as criteria for rearranging.
45- You can disable this behaviour with ` JsonDiff::SKIP_REARRANGE_ARRAY ` option:
45+ You can enable this behaviour with ` JsonDiff::REARRANGE_ARRAYS ` option:
4646``` php
4747$r = new JsonDiff(
4848 json_decode($originalJson),
49- json_decode($newJson),
50- JsonDiff::SKIP_REARRANGE_ARRAY
49+ json_decode($newJson),
50+ JsonDiff::REARRANGE_ARRAYS
5151);
5252```
5353
@@ -290,4 +290,4 @@ bin/json-diff info tests/assets/original.json tests/assets/new.json --with-paths
290290 "/key4/0/b"
291291 ]
292292}
293- ```
293+ ```
You can’t perform that action at this time.
0 commit comments