         } else if let v = value as? String {
             let scanner = NSScanner(string: v)
             var num: Double = 0.0
-            if scanner.scanDouble(&num) && scanner.atEnd {
+            if scanner.scanDouble(&num) && scanner.isAtEnd {
                 return num
             } else {
                 return nil

public func JSONConvertibleObjectsArrayValue <T: JSONObjectConvertible> (optional: AnyObject?) -> [T]? {
    if let raw: [JSONObject] = JSONObjectsArrayValue(optional) {
        var result: [T] = []
        result.reserveCapacity(raw.underestimateCount())
        for el in raw {
            if let output: T = try? T(raw: el) {
                result.append(output)

        } else if let v = value as? Int {
            return v != 0
        } else if let v = value as? String {
            let u = v.uppercased()
            if (u == "YES" || u == "TRUE" || u == "ON" || u == "Y" || u == "1") {
                return true
            } else if (u == "NO" || u == "FALSE" || u == "OFF" || u == "N" || u == "0") {
