Forum Discussion

markwhitton's avatar
markwhitton
New Contributor
8 years ago
Solved

SOAPUI 5.4.0 JSON Assertion of Double Values Ending .00

I have a script assertion which asserts double values for a JSON response.  These asserts have been working until the latest release of SOAPUI (5.4.0).  It would appear that JsonSlurper is truncating the value, removing .00 endings.  

 

Is this a known issue and is there a known workaround at this time?

 

My assert looks something like below...

 

def slurper = new JsonSlurper()

def json = slurper.parseText messageExchange.response.responseContent

assert json.accountBalance.value.toString() == "123.00"