← 返回 stripe 的题目列表Request Replay
类型:online_judge
Implement a request replay system to parse JSON data from files or network requests, and compare with expected results. Requirements:
Develop a request parsing function capable of handling file reading and HTTP requests.
Implement result comparison to verify parsed data against expected results.
Input Data:
Specify file path or API endpoint.
Provide expected JSON object.
Output Data:
If parsing is successful and matches the expected result, output MATCH.
If parsing is successful but the result does not match, output MISMATCH.
If parsing fails, output PARSE ERROR.
Constraints:
Provided JSON data is always in valid format.
Supports complete key-value matching.
Example Input/Output:
Input:
File or URL: example.json
Expected JSON: {"key":"value"}
Output:
MATCH
Example
Input
{"source": "example.json", "expected": {"key": "value"}}