Lines Matching refs:matchJSONVal

276 def find_in_json(res, outputJSONVal, matchJSONVal, matchJSONKey=None):  argument
280 if type(matchJSONVal) == list:
281 res = find_in_json_list(res, outputJSONVal, matchJSONVal, matchJSONKey)
283 elif type(matchJSONVal) == dict:
284 res = find_in_json_dict(res, outputJSONVal, matchJSONVal)
286 res = find_in_json_other(res, outputJSONVal, matchJSONVal, matchJSONKey)
294 def find_in_json_list(res, outputJSONVal, matchJSONVal, matchJSONKey=None): argument
295 if (type(matchJSONVal) != type(outputJSONVal)):
297 failmsg = failmsg.format(outputJSONVal, matchJSONVal)
302 if len(matchJSONVal) > len(outputJSONVal):
304 failmsg = failmsg.format(len(outputJSONVal), outputJSONVal, len(matchJSONVal), matchJSONVal)
309 for matchJSONIdx, matchJSONVal in enumerate(matchJSONVal):
310 res = find_in_json(res, outputJSONVal[matchJSONIdx], matchJSONVal,
314 def find_in_json_dict(res, outputJSONVal, matchJSONVal): argument
315 for matchJSONKey, matchJSONVal in matchJSONVal.items():
319 failmsg = failmsg.format(matchJSONKey, matchJSONVal, outputJSONVal)
333 if len(matchJSONVal) > 0:
334 res = find_in_json(res, outputJSONVal[matchJSONKey], matchJSONVal, matchJSONKey)
337 res = find_in_json_other(res, outputJSONVal, matchJSONVal, matchJSONKey)
339 res = find_in_json(res, outputJSONVal, matchJSONVal, matchJSONKey)
342 def find_in_json_other(res, outputJSONVal, matchJSONVal, matchJSONKey=None): argument
344 if matchJSONVal != outputJSONVal[matchJSONKey]:
346 … failmsg = failmsg.format(matchJSONKey, matchJSONVal, outputJSONVal[matchJSONKey], outputJSONVal)