Skip to content

Commit 53e6717

Browse files
committed
Updating readme.md file
1 parent 3566b00 commit 53e6717

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ $user = new UserData('John', 'Doe');
4747

4848
$userData = $user->toArray();
4949

50-
// Or you can use the json_encode function, as the DTO implements the JsonSerializable interface
50+
// Or transform to a JSON string
5151

52-
$userData = json_encode($user);
52+
$userData = $user->toJson();
5353

5454
```
5555

0 commit comments

Comments
 (0)