Error
public enum Error: Swift.Error
An enum to encapsulate errors that may arise in working with JSON
.
-
The
index
is out of bounds for a JSON arrayDeclaration
Swift
case indexOutOfBounds(index: Int)
-
The
key
was not found in the JSON dictionaryDeclaration
Swift
case keyNotFound(key: String)
-
The JSON is not subscriptable with
type
Declaration
Swift
case unexpectedSubscript(type: JSONPathType.Type)
-
Unexpected JSON
value
was found that is not convertibleto
typeDeclaration
Swift
case valueNotConvertible(value: JSON, to: Any.Type)
-
The JSON is not serializable to a
String
.Declaration
Swift
case stringSerializationError