Skip to content

Commit 16f0445

Browse files
authored
Update README.md
1 parent 9954d61 commit 16f0445

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ On construction `JsonDiff` will build `rearranged` value of `new` recursively ke
4242
Keys that are missing in `original` will be appended to the end of `rearranged` value in same order they had in `new` value.
4343

4444
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:
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+
```

0 commit comments

Comments
 (0)