Home
last modified time | relevance | path

Searched refs:JSONReader (Results 1 – 18 of 18) sorted by relevance

/external/libchrome/base/json/
Djson_reader_unittest.cc30 std::unique_ptr<Value> root = JSONReader().ReadToValue(" null "); in TEST()
37 EXPECT_FALSE(JSONReader().ReadToValue("nu")); in TEST()
42 std::unique_ptr<Value> root = JSONReader().ReadToValue("true "); in TEST()
49 std::unique_ptr<Value> root = JSONReader().ReadToValue("/* comment */null"); in TEST()
52 root = JSONReader().ReadToValue("40 /* comment */"); in TEST()
55 root = JSONReader().ReadToValue("true // comment"); in TEST()
58 root = JSONReader().ReadToValue("/* comment */\"sample string\""); in TEST()
65 JSONReader().ReadToValue("[1, /* comment, 2 ] */ \n 3]")); in TEST()
73 list = ListValue::From(JSONReader().ReadToValue("[1, /*a*/2, 3]")); in TEST()
76 root = JSONReader().ReadToValue("/* comment **/42"); in TEST()
[all …]
Djson_reader.cc14 static_assert(JSONReader::JSON_PARSE_ERROR_COUNT < 1000,
17 const char JSONReader::kInvalidEscape[] =
19 const char JSONReader::kSyntaxError[] =
21 const char JSONReader::kUnexpectedToken[] =
23 const char JSONReader::kTrailingComma[] =
25 const char JSONReader::kTooMuchNesting[] =
27 const char JSONReader::kUnexpectedDataAfterRoot[] =
29 const char JSONReader::kUnsupportedEncoding[] =
31 const char JSONReader::kUnquotedDictionaryKey[] =
34 JSONReader::JSONReader() in JSONReader() function in base::JSONReader
[all …]
Djson_parser_unittest.cc209 std::unique_ptr<Value> root = JSONReader::ReadAndReturnError( in TEST_F()
217 root = JSONReader::ReadAndReturnError(big_json, JSON_PARSE_RFC, &error_code, in TEST_F()
220 EXPECT_EQ(JSONParser::FormatErrorMessage(5, 10, JSONReader::kSyntaxError), in TEST_F()
222 EXPECT_EQ(JSONReader::JSON_SYNTAX_ERROR, error_code); in TEST_F()
230 root = JSONReader::ReadAndReturnError(big_json_crlf, JSON_PARSE_RFC, in TEST_F()
233 EXPECT_EQ(JSONParser::FormatErrorMessage(5, 10, JSONReader::kSyntaxError), in TEST_F()
235 EXPECT_EQ(JSONReader::JSON_SYNTAX_ERROR, error_code); in TEST_F()
238 root = JSONReader::ReadAndReturnError("{},{}", JSON_PARSE_RFC, &error_code, in TEST_F()
242 JSONReader::kUnexpectedDataAfterRoot), error_message); in TEST_F()
243 EXPECT_EQ(JSONReader::JSON_UNEXPECTED_DATA_AFTER_ROOT, error_code); in TEST_F()
[all …]
Djson_parser.cc202 error_code_(JSONReader::JSON_NO_ERROR), in JSONParser()
227 error_code_ = JSONReader::JSON_NO_ERROR; in Parse()
249 ReportError(JSONReader::JSON_UNEXPECTED_DATA_AFTER_ROOT, 1); in Parse()
277 JSONReader::JsonParseError JSONParser::error_code() const { in error_code()
283 JSONReader::ErrorCodeToString(error_code_)); in GetErrorMessage()
489 ReportError(JSONReader::JSON_UNEXPECTED_TOKEN, 1); in ParseToken()
496 ReportError(JSONReader::JSON_UNEXPECTED_TOKEN, 1); in ConsumeDictionary()
502 ReportError(JSONReader::JSON_TOO_MUCH_NESTING, 1); in ConsumeDictionary()
512 ReportError(JSONReader::JSON_UNQUOTED_DICTIONARY_KEY, 1); in ConsumeDictionary()
526 ReportError(JSONReader::JSON_SYNTAX_ERROR, 1); in ConsumeDictionary()
[all …]
Djson_reader.h60 class BASE_EXPORT JSONReader {
87 JSONReader();
90 explicit JSONReader(int options);
92 ~JSONReader();
Djson_value_converter_unittest.cc109 std::unique_ptr<Value> value = base::JSONReader::Read(normal_data); in TEST()
151 std::unique_ptr<Value> value = base::JSONReader::Read(normal_data); in TEST()
193 std::unique_ptr<Value> value = base::JSONReader::Read(normal_data); in TEST()
209 std::unique_ptr<Value> value = base::JSONReader::Read(normal_data); in TEST()
232 std::unique_ptr<Value> value = base::JSONReader::Read(normal_data); in TEST()
249 std::unique_ptr<Value> value = base::JSONReader::Read(normal_data); in TEST()
Djson_parser.h59 JSONReader::JsonParseError error_code() const;
216 void ReportError(JSONReader::JsonParseError code, int column_adjust);
249 JSONReader::JsonParseError error_code_;
Djson_value_serializer_unittest.cc81 std::unique_ptr<Value> root = JSONReader::Read(json); in ValidateJsonList()
144 ASSERT_EQ(JSONReader::JSON_TRAILING_COMMA, error_code); in TEST()
197 ASSERT_EQ(JSONReader::JSON_TRAILING_COMMA, error_code); in TEST()
383 std::unique_ptr<Value> root = JSONReader::Read("[\"// ok\\n /* foo */ \"]"); in TEST()
394 root = JSONReader::Read("/* /* inner */ outer */ [ 1 ]"); in TEST()
398 root = JSONReader::Read("/ * * / [1]"); in TEST()
Djson_string_value_serializer.cc54 return base::JSONReader::ReadAndReturnError( in Deserialize()
/external/libchrome/base/trace_event/
Dheap_profiler_type_name_deduplicator_unittest.cc37 return JSONReader::Read(json); in DumpAndReadBack()
Dtrace_config_unittest.cc355 JSONReader::Read(kDefaultTraceConfigString)); in TEST()
369 JSONReader::Read(kCustomTraceConfigString)); in TEST()
Dtrace_config.cc367 auto dict = DictionaryValue::From(JSONReader::Read(config_string)); in InitializeFromConfigString()
Dtrace_event_unittest.cc194 std::unique_ptr<Value> root = base::JSONReader::Read( in OnTraceDataCollected()
/external/libchrome/base/metrics/
Dstatistics_recorder_unittest.cc372 std::unique_ptr<Value> root = JSONReader::Read(json); in TEST_P()
397 root = JSONReader::Read(json); in TEST_P()
/external/libbrillo/brillo/http/
Dhttp_transport_fake.cc183 auto value = base::JSONReader::Read(GetDataAsString()); in GetDataAsJson()
Dhttp_utils.cc399 auto value = base::JSONReader::ReadAndReturnError(json, base::JSON_PARSE_RFC, in ParseJsonResponse()
/external/libbrillo/brillo/
Dvalue_conversion_unittest.cc34 auto value = base::JSONReader::ReadAndReturnError(json, base::JSON_PARSE_RFC, in ParseValue()
/external/libchrome/base/test/
Dtrace_event_analyzer.cc705 std::unique_ptr<base::Value> root = base::JSONReader::Read(json); in ParseEventsFromJson()