Thanks Felix for precise explanation. That helped to understand reason for mismatch.
Regards, Vikrant From: Felix Schumacher <felix.schumac...@internetallee.de> Sent: 08 December 2024 15:28 To: user@jmeter.apache.org Subject: Re: Issue in JSON format representation in 'View Results Tree' Am 08.12.24 um 02:14 schrieb v...@varcos.in <mailto:v...@varcos.in> : Thanks Felix for quick clarification. While order of entries don’t matter is a fair point, I am curious to know the reason behind mismatch. Well, the ordering is an implementation artifact. The JSON component parses the structure and compiles JSON objects into a Java HashMap, which has no order. When that HashMap is displayed, the original order is lost. The Text display does no parsing at all and thus keeps the ordering of the (characters of the) original message. Best regards Felix Regards, Vikrant From: Felix Schumacher <mailto:felix.schumac...@internetallee.de> <felix.schumac...@internetallee.de> Sent: 07 December 2024 16:53 To: JMeter Users List <mailto:user@jmeter.apache.org> <user@jmeter.apache.org> Subject: Re: Issue in JSON format representation in 'View Results Tree' In JSON view the result is interpreted by JMeter as JSON and as such the order of the entries (in an object/dict/hash) doesn't matter (to JSON). In Text view the result is shown character for character as it is received. Why is the difference important to you? If you want to assert against JSON result, you should use the JSON assertion, which should work without problems disregard of the displayed order. Same is true for extraction with JSON extractor. I would argue, that ignoring the order in objects/dicts/hashes improves the robustness of the extraction/assertion (and even display) of JSON results. Best regards Felix Am 07.12.24 um 11:55 schrieb v...@varcos.in <mailto:v...@varcos.in> : Hi all, I am testing Rest API transaction (FAST-APIs built using Python). When I get response I see that JSON representation does not match Text view in ‘View Results Tree’. Attaching both screenshots, the one in Text view is correct while in JSON view, parameter’s sequence gets changed. Not sure what is the reason, can some one please help, how to get both in sync? Regards, Vikrant Joshi