Skip to content

Commit 406c14a

Browse files
committed
fix deserialize example in readme
1 parent 6bd5e9e commit 406c14a

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
@@ -224,14 +224,14 @@ You can deserialize your model to from a json using `deserialize` method:
224224

225225
```typescript
226226
import {deserialize} from "class-transformer";
227-
let photo = deserialize(photo);
227+
let photo = deserialize(Photo, photo);
228228
```
229229

230230
To make deserialization to work with arrays use `deserializeArray` method:
231231

232232
```typescript
233233
import {deserializeArray} from "class-transformer";
234-
let photos = deserializeArray(photos);
234+
let photos = deserializeArray(Photo, photos);
235235
```
236236

237237
## Working with nested objects

0 commit comments

Comments
 (0)