Skip to content

1.6.0

Latest

Choose a tag to compare

@ale-zai ale-zai released this 14 Jan 14:08
· 4 commits to main since this release

Decode array of objects by skipping corrupted ones.

// JSON array is: [1, "2", 3]
let numbers = try JSONDecoder().decodeArrayIgnoringErrors(of: Int.self, from: jsonData)
// numbers is [1, 3]