Forum Discussion
avidCoder
Super Contributor
Please change the code to this line :-
import groovy.json.JsonSlurper def response=messageExchange.response.responseContent def json=new JsonSlurper().parseText(response) float amount=json.amounts.amount assert amount==~ /\d{0,8}\.\d{2}/
Vivi
6 years agoOccasional Contributor
Hi,
The float is not solving the problem. For example the "amount": 20000.00 (RAW) is now shown as 20000.0 in json and when I have the log.info for this node.
So the assertion is still failing even if I declare it as float or double.
Related Content
- 7 years ago
- 9 years ago