![]() Test tab in Fist GET API var jsonData = pm.response. The JSON Comparison package This package is designed to compare two objects with a JSON-like structure and data types. Appreciate some dis-advantages of processing JSON documents. I have used POSTMAN with below method but not able to make it scalable which can read the parameter name and value from each element of array and compare it with another APIs array elements. Appreciate some advantages of using JSON over tabular data. Comparing Json: Comparing json is quite simple, we can use ‘’ operator, Note: ‘’ and ‘is’ operator are not same, ‘’ operator is use to check equality of values, whereas ‘is’ operator. These are language independent source codes used for data exchange and are generally lightweight in nature. It is also referred to as the in comparison operator. GET API Response for second API array element has parameter name Number:12345 Comparison JSON operators in, Returns any documents that match any of the specified values in the set. ![]() Alex Reynolds 2 days ago gives a memory error (which is not about RAM, as I can see, cause I have 256 GB) Thats no guarantee. Start with a subset, measure memory usage, and scale up if your system allows. The standard equals () method considers values 5.0 and 5 as different. Maybe load your JSON into a memory-backed store, like Redis, and use the Python API to query. ![]() GET API Response for first API array element has parameter name AccountNumber: 12345 Let's read the input JSON as JsonNode and compare: JsonNode actualObj1 mapper.readTree (s1) JsonNode actualObj2 mapper.readTree (s2) assertNotEquals (actualObj1, actualObj2) Notice that the two objects are not equal. JsonDiff: Library for JSON DIFF fp1 (object) file object (opened with read permission) fp2 (object) file object (opened with read permission) include. ![]() I have a scenario where want to compare the responses which is received in array format and each element of array has some parameters which needs to be compared with another API & again that API has response in array format with each element of array has some parameters but names for that parameter is different in both APIs ![]()
0 Comments
Leave a Reply. |