Skip to content

Commit 700b4f2

Browse files
authored
Update README.md
1 parent cd577bc commit 700b4f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ let meals = try KeyValuDecoder().decode([String].self, from: ["fish", 1])
5353

5454
// throws DecodingError.valueNotFound 'Expected String at SELF[1].name, found nil'
5555
let user = try KeyValuDecoder().decode(User.self, from: [["id": 1, "name": "Herbert"], ["id:" 2])
56+
57+
// throws DecodingError.typeMismatch 'Int at SELF[2], cannot be exactly represented by UInt8'
58+
let ascii = try KeyValueDecoder().decode([UInt8].self, from: [10, 100, 1000])
5659
```
5760

5861
## Nil Encoding/Decoding Strategy

0 commit comments

Comments
 (0)