I was trying to match whole response with a json file.
Background:
* url BaseURL
* def resp = read('response_get_discount.json') // Reading json file
Scenario: Verify Users discount
Given path '/discount'
When method get
Then status 200
* match response == resp //Trying to match whole response with the output of the above json file
Problem:
My json file has below output in Spain:
{
"familyCode": "DH",
"validityStart": 1575500400000,
"description": "Aparamenta modular Limitadores sobretensiones + Gestión Energía (SPD + CCB)"
}
Please note the words "Gestión Energía", when it is reading from file it is being converted to "Gesti�n Energ�a". Hence it is failing to match with response vs resp.
Is there a way to ignore or handle such encoding characters?