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
42
42
Keys that are missing in ` original ` will be appended to the end of ` rearranged ` value in same order they had in ` new ` value.
43
43
44
44
If 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:
46
46
``` php
47
47
$r = new JsonDiff(
48
48
json_decode($originalJson),
49
- json_decode($newJson),
50
- JsonDiff::SKIP_REARRANGE_ARRAY
49
+ json_decode($newJson),
50
+ JsonDiff::REARRANGE_ARRAYS
51
51
);
52
52
```
53
53
@@ -290,4 +290,4 @@ bin/json-diff info tests/assets/original.json tests/assets/new.json --with-paths
290
290
"/key4/0/b"
291
291
]
292
292
}
293
- ```
293
+ ```
You can’t perform that action at this time.
0 commit comments