             return (nil, cursor.advancedBy(4))
     }
     // invalid json
-    return (JSON(), cursor)
+    return (.None("invalid json: expect 'null' at \(cursor)"), cursor)
 }
 
 private func parseTrue(string: String, index: String.Index) -> (JSON, String.Index) {

        case .Null: return parseNull(string, index: cursor)
        default: break
    }
    return (JSON(), index)
}

private func parseString(string: String, index: String.Index) -> (JSON, String.Index) {
    let (s, cursor) = _parseString(string, index: index)
    if  let json = s {
        return (JSON(json), cursor)
    }
    return (JSON(), cursor)
}

private func parseNumber(string: String, index: String.Index) -> (JSON, String.Index) {

    
    guard cursor.distanceTo(string.endIndex) > 3 else {
        // invalid json
        return (.None("invalid json: expect 'true' at \(cursor)"), cursor)
    }
    
    if  string[cursor] == "t" 
