BoxDecodingError

public enum BoxDecodingError : Error

Decoding error providing more detailed information about decoding failure.

  • Decoder was not able to decode a value of type for a key.

    Declaration

    Swift

    case typeMismatch(key: String, expectedType: Any)

    Parameters

    key

    key of a value in JSON dictionary

    expectedType

    expected type of a value

  • Decoder was not able to find expected value, instead found another value of the same type, for a key.

    Declaration

    Swift

    case valueMismatch(key: String, value: Any, acceptedValues: [Any])

    Parameters

    key

    key of a value in JSON dictionary

    value

    found value

    expectedValue

    expected value

  • Decoder found a value of a correct type for further conversion a key, but was not able to convert value to expected type.

    Declaration

    Swift

    case invalidValueFormat(key: String, value: Any, expectedType: Any)

    Parameters

    key

    key of a value in JSON dictionary

    value

    value to convert

    expectedValue

    type a value was supposed to be converted to

  • Decoder was not able to decode item despite the request being successful.

    Declaration

    Swift

    case createdItemNotFound