Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Fixed the "expected output" with the actual var_dump result
  • Loading branch information
blancks authored Nov 7, 2024
1 parent 4872031 commit 31f4db5
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,26 @@ $patch = '[
$FastJsonPatch = FastJsonPatch::fromJson($document);
$FastJsonPatch->apply($patch);

print_r($FastJsonPatch->getDocument());
var_dump($FastJsonPatch->getDocument());
```

**Expected Output:**

```php
[
"baz" => ["qux", "boo"],
"hello" => ["world" => "wide"]
]
```txt
object(stdClass)#9 (2) {
["baz"]=>
array(2) {
[0]=>
string(3) "qux"
[1]=>
string(3) "boo"
}
["hello"]=>
object(stdClass)#21 (1) {
["world"]=>
string(4) "wide"
}
}
```

The expected workflow is that once you got a `FastJsonPatch` instance you can call the `apply` method each time a new patch is received.
Expand Down

0 comments on commit 31f4db5

Please sign in to comment.