Forum Discussion
avidCoder
6 years agoSuper 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}/
- Vivi6 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
Recent Discussions
- 3 hours ago
- 17 days ago