ParseError

public enum ParseError: ErrorType

Errors raised while parsing JSON data.

  • Some unknown error, usually indicates something not yet implemented.

    Declaration

    Swift

    case Unknown
  • Input data was either empty or contained only whitespace.

    Declaration

    Swift

    case EmptyInput
  • Some character that violates the strict JSON grammar was found.

    Declaration

    Swift

    case UnexpectedCharacter(lineNumber: UInt, characterNumber: UInt)
  • A JSON string was opened but never closed.

    Declaration

    Swift

    case UnterminatedString
  • Any unicode parsing errors will result in this error. Currently unused.

    Declaration

    Swift

    case InvalidUnicode
  • A keyword, like null, true, or false was expected but something else was in the input.

    Declaration

    Swift

    case UnexpectedKeyword(lineNumber: UInt, characterNumber: UInt)
  • Encountered a JSON number that couldn’t be losslessly stored in a Double or Int64. Usually the number is too large or too small.

    Declaration

    Swift

    case InvalidNumber(lineNumber: UInt, characterNumber: UInt)
  • End of file reached, not always an actual error.

    Declaration

    Swift

    case EndOfFile