Lines Matching refs:Json
14 // See gm_json.py for descriptions of each of these JSON keys.
25 // Types of result hashes we support in the JSON file.
40 Json::Value CreateJsonTree(Json::Value expectedResults,
41 Json::Value actualResultsFailed,
42 Json::Value actualResultsFailureIgnored,
43 Json::Value actualResultsNoComparison,
44 Json::Value actualResultsSucceeded) {
45 Json::Value actualResults;
50 Json::Value root;
63 GmResultDigest::GmResultDigest(const Json::Value &jsonTypeValuePair) {
66 gm_fprintf(stderr, "found non-array json value when parsing GmResultDigest: %s\n",
70 gm_fprintf(stderr, "found json array with wrong size when parsing GmResultDigest: %s\n",
76 Json::Value jsonHashValue = jsonTypeValuePair[1];
99 Json::Value GmResultDigest::asJsonTypeValuePair() const {
102 Json::Value jsonTypeValuePair;
104 jsonTypeValuePair.append(Json::Value(kJsonKey_Hashtype_Bitmap_64bitMD5));
105 jsonTypeValuePair.append(Json::UInt64(fHashDigest));
107 jsonTypeValuePair.append(Json::Value("INVALID"));
139 Expectations::Expectations(Json::Value jsonElement) {
143 Json::Value ignoreFailure = jsonElement[kJsonKey_ExpectedResults_IgnoreFailure];
147 gm_fprintf(stderr, "found non-boolean json value"
157 Json::Value allowedDigests = jsonElement[kJsonKey_ExpectedResults_AllowedDigests];
161 gm_fprintf(stderr, "found non-array json value"
167 for (Json::ArrayIndex i=0; i<allowedDigests.size(); i++) {
184 Json::Value Expectations::asJsonValue() const {
185 Json::Value allowedDigestArray;
192 Json::Value jsonExpectations;
246 /*static*/ bool JsonExpectationsSource::Parse(const char *jsonPath, Json::Value *jsonRoot) {
249 gm_fprintf(stderr, "unable to read JSON file %s\n", jsonPath);
256 gm_fprintf(stderr, "error reading JSON file %s\n", jsonPath);
263 Json::Reader reader;
265 gm_fprintf(stderr, "error parsing JSON file %s\n", jsonPath);