0

I got a Rest Assured Response object. While trying to convert from Response object to JSON. The conversation happen successfully but JSON order is mismatch. It would be great if some one assist on this.

Conversion:

JSONObject jobj = new JSONObject(restAssuredResponse.getBody());
Luciano van der Veekens
  • 6,307
  • 4
  • 26
  • 30

1 Answers1

0

Basically, JSON is an unordered set of key value pairs. Which, for any JSON object the order of key/value pairs shouldn't be considered.

The JSON Object should be considered equal even if the order is not the same.

Thiru
  • 2,541
  • 4
  • 25
  • 39