Statham is a library for dealing with JSON in Swift, it provides the ValueOrDecodingError<Wrapped>
type.
struct Inbox: Decodable {
let items: [ValueOrDecodingError<Item>]
}
Using this structure, if one of the items can't be decoded, the others still will be decoded.
Version 2.0 of this library is a competely different thing than the 1.0 version of Statham. The previous version was used for a custom Json decoder code generator, but as of Swift 4 with Decodable, this code generator is no longer needed.
Read more about version 1 of Statham.
- 2.2.0 - 2021-01-19 - Add .value setter on ValueOrDecodingError type
- 2.1.0 - 2019-06-10 - Add Indirect type, to deal with cycles in JSON structs/enums
- 2.0.0 - 2018-08-21 - Replaced previous library with ValueOrJsonError
Statham is written by Tom Lokhorst and available under the MIT license, so feel free to use it in commercial and non-commercial projects.