                             }
                             else {
                                 // invalid json 
-                                return (nil, cursor)
+                                return (nil, cursor, "invalid json: illegal unicode hex digit at \(cursor) ")
                             }
                             
                         }
                         else {
                             // invalid json format
-                            return (nil, cursor)
+                            return (nil, cursor, "invalid json: illegal unicode hex digit at \(cursor)")
                         }
                     
                     // invalid json format
-                    default: return (nil, cursor)
+                    default: return (nil, cursor, "invalid json: illegal character \(ch) after '\\' at \(cursor)")
                 }
             
-            case "\"": return (result, cursor.advancedBy(1))
+            case "\"": return (result, cursor.advancedBy(1), nil)
             default: result.append(string[cursor])
         }
         cursor = cursor.advancedBy(1)
     }
-    return (result, cursor)
+    return (nil, cursor, "invalid json: expect character \" at \(cursor)")
 }
 
 /**

                cursor = cursor.advancedBy(1)
                // invalid json format
                if  cursor == string.endIndex {
                    return (nil, cursor)
                }
                let ch = string[cursor]
                switch ch {

        let (json, next) = parseValue(string, index: cursor)
        switch json {
            // parse error
            case .None(let err): return (.None(err), next)
            default: break
        }
        cursor = next
