5.1.0
5.1.0
This will be the last update specifically supporting Xcode 10.1 and Swift 4.2.
New Procedures
-
[919]: JSON Coding procedures.
This changes introduced a generic
JSONDecodingProcedureandJSONEncodingProcedurewhich can be used to decode/decode aDatarepresenting a UTF-8 encoded JSON string into a suitableCodabletype. The procedure allows full injection of theJSONDecoderwith a convenience initializer to user or override the default behavior. Additionally, theDatacan be inject from a network procedure. For decoding errors - the procedure will fail with the coding error from theJSONDecoder. This might be quite tricky to recover from and manage in production code, so in some cases it would make sense to decode into a type which can handle JSON error responses, e.g.{"message": "Failed to authorize"}.