 
     func consumeWhitespace(input: Index) -> Index? {
         var index = input
-        while let char = source.peekASCII(index) where JSONReader.whitespaceASCII.contains(char) {
-            index += source.step
+        while let (char, nextIndex) = source.takeASCII(index) where JSONReader.whitespaceASCII.contains(char) {
+            index = nextIndex
         }
         return index
     }

            }()
        }

        func peekASCII(input: Index) -> UInt8? {
            guard hasNext(input) else {
                return nil
            }

                    ])
                }
            default:
                currentIndex = index
            }
        }
        throw NSError(domain: NSCocoaErrorDomain, code: NSCocoaError.PropertyListReadCorruptError.rawValue, userInfo: [
