-
Notifications
You must be signed in to change notification settings - Fork 73
0.5.0 Migration guide
Johannes Lund edited this page Sep 12, 2016
·
6 revisions
Still ok:
let value = json => "a" => "b" => "c" // still ok
let value = json =>? "a" => "b" => "c" // still ok
Doesn't work:
let key = "a"
let value = json => a
Please use:
let key = "a"
let value = json => KeyPath(a)
-MissingKeyError
+DecodingError.missingKey(key)
-TypeMismatchError
+DecodingError.typeMismatch(expected, actual, metadata)
-RawRepresentableInitializationError
+DecodingError.rawRepresentableInitializationError(rawValue, metadata)
This applies everywhere. E.g
static func decode(_ json: Any) throws -> Self