Statham is a library for dealing with JSON in Swift, it provides the ValueOrDecodingError<Wrapped>
type.
Example
stuct Inbox: Decodable {
let items: [ValueOrDecodingError<Item>]
}
Using this structure, if one of the items can't be decoded, the others still will be decoded.
About the previous version 1
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.
Releases
- 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
Licence & Credits
Statham is written by Tom Lokhorst of Q42 and available under the MIT license, so feel free to use it in commercial and non-commercial projects.