Forum Discussion
ckramer1
7 years agoNew Contributor
I received the below response from SmartBear support. It may help if you are comparing a single field. We compare the complete JSON so it does not help me.
"We had a bug regarding the JSON decimal in the earlier version which was fixed in 2.3. After the bug fix, the decimal type, which looks like 150.000(for example), is not truncated and the complete value is displayed.
You can use Script assertion to validate decimal type now (Please see attached - bigDecimalValue.jpg). There is an example:
def response = context.expand( '${REST Request#Response#$[\'decimal\']}' ) // replace the JSONPath expression with the correct one assert 150.0 == new BigDecimal(response)."
Related Content
- 4 years ago
- 10 years ago
Recent Discussions
- 22 days ago