Lines Matching refs:JSONReader
207 root.reset(JSONReader::ReadAndReturnError("[42]", JSON_PARSE_RFC,
215 root.reset(JSONReader::ReadAndReturnError(big_json, JSON_PARSE_RFC,
218 EXPECT_EQ(JSONParser::FormatErrorMessage(5, 10, JSONReader::kSyntaxError),
220 EXPECT_EQ(JSONReader::JSON_SYNTAX_ERROR, error_code);
228 root.reset(JSONReader::ReadAndReturnError(big_json_crlf, JSON_PARSE_RFC,
231 EXPECT_EQ(JSONParser::FormatErrorMessage(5, 10, JSONReader::kSyntaxError),
233 EXPECT_EQ(JSONReader::JSON_SYNTAX_ERROR, error_code);
236 root.reset(JSONReader::ReadAndReturnError("{},{}", JSON_PARSE_RFC,
240 JSONReader::kUnexpectedDataAfterRoot), error_message);
241 EXPECT_EQ(JSONReader::JSON_UNEXPECTED_DATA_AFTER_ROOT, error_code);
248 root.reset(JSONReader::ReadAndReturnError(nested_json, JSON_PARSE_RFC,
251 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 100, JSONReader::kTooMuchNesting),
253 EXPECT_EQ(JSONReader::JSON_TOO_MUCH_NESTING, error_code);
255 root.reset(JSONReader::ReadAndReturnError("[1,]", JSON_PARSE_RFC,
258 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 4, JSONReader::kTrailingComma),
260 EXPECT_EQ(JSONReader::JSON_TRAILING_COMMA, error_code);
262 root.reset(JSONReader::ReadAndReturnError("{foo:\"bar\"}", JSON_PARSE_RFC,
266 JSONReader::kUnquotedDictionaryKey), error_message);
267 EXPECT_EQ(JSONReader::JSON_UNQUOTED_DICTIONARY_KEY, error_code);
269 root.reset(JSONReader::ReadAndReturnError("{\"foo\":\"bar\",}",
273 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 14, JSONReader::kTrailingComma),
276 root.reset(JSONReader::ReadAndReturnError("[nu]", JSON_PARSE_RFC,
279 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 2, JSONReader::kSyntaxError),
281 EXPECT_EQ(JSONReader::JSON_SYNTAX_ERROR, error_code);
283 root.reset(JSONReader::ReadAndReturnError("[\"xxx\\xq\"]", JSON_PARSE_RFC,
286 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 7, JSONReader::kInvalidEscape),
288 EXPECT_EQ(JSONReader::JSON_INVALID_ESCAPE, error_code);
290 root.reset(JSONReader::ReadAndReturnError("[\"xxx\\uq\"]", JSON_PARSE_RFC,
293 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 7, JSONReader::kInvalidEscape),
295 EXPECT_EQ(JSONReader::JSON_INVALID_ESCAPE, error_code);
297 root.reset(JSONReader::ReadAndReturnError("[\"xxx\\q\"]", JSON_PARSE_RFC,
300 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 7, JSONReader::kInvalidEscape),
302 EXPECT_EQ(JSONReader::JSON_INVALID_ESCAPE, error_code);
313 JSONReader::ReadAndReturnError(kUtf8Data, JSON_PARSE_RFC, &error_code,