Skip to content

Any way to make JSON body assertion ignore formatting? #2260

Answered by jcamiel
micka190 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @micka190

Thanks for the feedback. Effectively, the current JSON body assertion is whitespace sensitive and we want to change this. In a future release:

GET https://foo.com
HTTP 200
{
  "success": true,
  "payload": null,
  "errors": {
    "all": []
  }
}

Will do a "semantic" assertion (whitespace insentive), that we've to specify, while:

GET https://foo.com
HTTP 200
```json
HTTP 200
{
  "success": true,
  "payload": null,
  "errors": {
    "all": []
  }
}
```

Will do an exact match assertion.

There're similar issue and we want to address them #270 #272
Another possibility (still not implemented) is to add support for JSON schema #543

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@micka190
Comment options

Answer selected by micka190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants