Then the response should be valid JSON

Verify the response is valid JSON.

Two equivalent phrasings.

Step pattern

Then (?:the response should be valid JSON|the API response should be valid JSON)

Examples

Example #1
Then the response should be valid JSON
Example #2
Then the API response should be valid JSON
Example #3
And the response should be valid JSON
Example #4
When I send a GET request to "/api/users"
Then the API response should be valid JSON
Example #5
When I send a POST request to "/api/orders"
Then the response should be valid JSON