         }
         
         while cursor != string.endIndex {
-            let (_key, afterKey) = try _parseString(cursor)
+            let (_key, afterKey) = try _parseString(eatWhiteSpace(cursor))
             guard let key = _key else {
                 // parse key error, invalid json
                 throw ParseError("invalid json: expect string at \(cursor)")

    
    private mutating func _parseString(index: Int) throws -> (String?, Int) {
        // skip first '\"' character
        var cursor = eatWhiteSpace(index).successor()
        
        tempStringBuffer.removeAll(keepCapacity: true)
        

    }
    
    private mutating func parseNumber(index: Int) throws -> (JSON, Int) {
        let cursor = index
        
        if let (double, distance) = parseDouble(string.baseAddress.advancedBy(cursor)) {
            return (JSON(double), cursor + distance)
