DecodingError
public enum DecodingError : Error, Equatable
Undocumented
-
See moreDecodingError.Metadata
provides information about where anDecodingError
was thrown in the JSON object graph.Declaration
Swift
public struct Metadata : Equatable
-
Thrown when optional casting from
Any
fails.This can happen both when trying to access a key on a object that isn’t a
NSDictionary
, and failing to cast aCastable
primitive.Declaration
Swift
case typeMismatch(expected: Any.Type, actual: Any.Type, Metadata)
-
Thrown when a given, required, key was not found in a dictionary.
Declaration
Swift
case missingKey(String, Metadata)
-
Thrown from the
RawRepresentable
extension wheninit(rawValue:)
returnednil
.Declaration
Swift
case rawRepresentableInitializationError(rawValue: Any, Metadata)
-
When an error is thrown that isn’t
DecodingError
, it will be wrapped inDecodingError.other
in order to also provide metadata about where the error was thrown.Declaration
Swift
case other(Error, Metadata)
-
Undocumented
Declaration
Swift
public var metadata: Metadata { get set }
-
Undocumented
Declaration
Swift
public var debugDescription: String { get }