Home
last modified time | relevance | path

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

/external/libchrome/base/json/
Djson_reader_unittest.cc25 std::unique_ptr<Value> root = JSONReader().ReadToValue(" null "); in TEST()
31 EXPECT_FALSE(JSONReader().ReadToValue("nu")); in TEST()
35 std::unique_ptr<Value> root = JSONReader().ReadToValue("true "); in TEST()
41 std::unique_ptr<Value> root = JSONReader().ReadToValue("/* comment */null"); in TEST()
44 root = JSONReader().ReadToValue("40 /* comment */"); in TEST()
47 root = JSONReader().ReadToValue("true // comment"); in TEST()
50 root = JSONReader().ReadToValue("/* comment */\"sample string\""); in TEST()
57 ListValue::From(JSONReader().ReadToValue("[1, /* comment, 2 ] */ \n 3]")); in TEST()
65 list = ListValue::From(JSONReader().ReadToValue("[1, /*a*/2, 3]")); in TEST()
68 root = JSONReader().ReadToValue("/* comment **/42"); in TEST()
[all …]
Djson_reader.cc19 const int JSONReader::kStackMaxDepth = 200;
22 static_assert(JSONReader::JSON_PARSE_ERROR_COUNT < 1000,
25 const char JSONReader::kInvalidEscape[] =
27 const char JSONReader::kSyntaxError[] =
29 const char JSONReader::kUnexpectedToken[] =
31 const char JSONReader::kTrailingComma[] =
33 const char JSONReader::kTooMuchNesting[] =
35 const char JSONReader::kUnexpectedDataAfterRoot[] =
37 const char JSONReader::kUnsupportedEncoding[] =
39 const char JSONReader::kUnquotedDictionaryKey[] =
[all …]
Djson_parser_unittest.cc228 std::unique_ptr<Value> root = JSONReader::ReadAndReturnError( in TEST_F()
236 root = JSONReader::ReadAndReturnError(big_json, JSON_PARSE_RFC, &error_code, in TEST_F()
239 EXPECT_EQ(JSONParser::FormatErrorMessage(5, 10, JSONReader::kSyntaxError), in TEST_F()
241 EXPECT_EQ(JSONReader::JSON_SYNTAX_ERROR, error_code); in TEST_F()
249 root = JSONReader::ReadAndReturnError(big_json_crlf, JSON_PARSE_RFC, in TEST_F()
252 EXPECT_EQ(JSONParser::FormatErrorMessage(5, 10, JSONReader::kSyntaxError), in TEST_F()
254 EXPECT_EQ(JSONReader::JSON_SYNTAX_ERROR, error_code); in TEST_F()
257 root = JSONReader::ReadAndReturnError("{},{}", JSON_PARSE_RFC, &error_code, in TEST_F()
261 JSONReader::kUnexpectedDataAfterRoot), error_message); in TEST_F()
262 EXPECT_EQ(JSONReader::JSON_UNEXPECTED_DATA_AFTER_ROOT, error_code); in TEST_F()
[all …]
Djson_parser.cc65 error_code_(JSONReader::JSON_NO_ERROR), in JSONParser()
68 CHECK_LE(max_depth, JSONReader::kStackMaxDepth); in JSONParser()
79 error_code_ = JSONReader::JSON_NO_ERROR; in Parse()
86 ReportError(JSONReader::JSON_TOO_LARGE, 0); in Parse()
102 ReportError(JSONReader::JSON_UNEXPECTED_DATA_AFTER_ROOT, 1); in Parse()
109 JSONReader::JsonParseError JSONParser::error_code() const { in error_code()
115 JSONReader::ErrorCodeToString(error_code_)); in GetErrorMessage()
323 ReportError(JSONReader::JSON_UNEXPECTED_TOKEN, 1); in ParseToken()
330 ReportError(JSONReader::JSON_UNEXPECTED_TOKEN, 1); in ConsumeDictionary()
336 ReportError(JSONReader::JSON_TOO_MUCH_NESTING, 0); in ConsumeDictionary()
[all …]
Djson_value_converter_unittest.cc108 std::unique_ptr<Value> value = base::JSONReader::Read(normal_data); in TEST()
150 std::unique_ptr<Value> value = base::JSONReader::Read(normal_data); in TEST()
192 std::unique_ptr<Value> value = base::JSONReader::Read(normal_data); in TEST()
208 std::unique_ptr<Value> value = base::JSONReader::Read(normal_data); in TEST()
231 std::unique_ptr<Value> value = base::JSONReader::Read(normal_data); in TEST()
248 std::unique_ptr<Value> value = base::JSONReader::Read(normal_data); in TEST()
Djson_parser.h46 JSONParser(int options, int max_depth = JSONReader::kStackMaxDepth);
56 JSONReader::JsonParseError error_code() const;
207 void ReportError(JSONReader::JsonParseError code, int column_adjust);
236 JSONReader::JsonParseError error_code_;
Djson_reader.h59 class BASE_EXPORT JSONReader {
90 JSONReader(int options = JSON_PARSE_RFC, int max_depth = kStackMaxDepth);
92 ~JSONReader();
Djson_value_serializer_unittest.cc79 std::unique_ptr<ListValue> list = ListValue::From(JSONReader::Read(json)); in ValidateJsonList()
142 ASSERT_EQ(JSONReader::JSON_TRAILING_COMMA, error_code); in TEST()
196 ASSERT_EQ(JSONReader::JSON_TRAILING_COMMA, error_code); in TEST()
382 ListValue::From(JSONReader::Read("[\"// ok\\n /* foo */ \"]")); in TEST()
392 ASSERT_FALSE(JSONReader::Read("/* /* inner */ outer */ [ 1 ]")); in TEST()
395 ASSERT_FALSE(JSONReader::Read("/ * * / [1]")); in TEST()
Djson_correctness_fuzzer.cc38 auto parsed_value = base::JSONReader::ReadAndReturnError( in LLVMFuzzerTestOneInput()
48 auto double_parsed_value = base::JSONReader::ReadAndReturnError( in LLVMFuzzerTestOneInput()
Djson_reader_fuzzer.cc24 base::JSONReader::ReadAndReturnError(input_string, options, &error_code, in LLVMFuzzerTestOneInput()
Djson_string_value_serializer.cc53 return base::JSONReader::ReadAndReturnError(json_string_, options_, in Deserialize()
/external/syzkaller/vendor/google.golang.org/api/compute/v0.beta/
Dcompute-gen.go19149 body, err := googleapi.WithoutDataWrapper.JSONReader(c.address)
19586 body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest)
19749 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
20510 body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
20952 body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
21112 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
21295 body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
21782 body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket)
22197 body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket)
22368 body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket)
[all …]
/external/syzkaller/vendor/google.golang.org/api/storage/v1/
Dstorage-gen.go2157 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
2456 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
2612 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
3307 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket)
3792 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2)
4003 body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy)
4383 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2)
4585 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
4969 body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
5297 body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
[all …]
/external/syzkaller/vendor/google.golang.org/api/googleapi/
Dgoogleapi.go169 func (wrap MarshalStyle) JSONReader(v interface{}) (io.Reader, error) { func
/external/libchrome/base/metrics/
Dstatistics_recorder_unittest.cc362 std::unique_ptr<Value> root = JSONReader::Read(json); in TEST_P()
389 root = JSONReader::Read(json); in TEST_P()
/external/libbrillo/brillo/
Dvalue_conversion_unittest.cc34 auto value = base::JSONReader::ReadAndReturnError(json, base::JSON_PARSE_RFC, in ParseValue()
/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/policy/
Ddevice_policy_impl.cc152 base::JSONReader::ReadAndReturnError(json_string, in DecodeListValueFromJSON()