Hey
harishlean,
Just trying to understand.
When you say the json is invalid, do you mean 'malformed' or 'invalid'?
Malformed means that the json payload does not conform to standard syntactical wellformed json rules.
Invalid means that the json payload is invalid relative to either a json schema/swagger/open api definition.
Im asking to clarify cos they mean two different things and they need different resolutions to sort.
Are you saying you get a response back, but the json payload is actually malformed json?
To confirm if its malformed json, copy the payload into here -->
https://jsonpathfinder.com/If the jsonpathfinder website errors, then you have malformed json.
If the payload is malformed json, then you need a code fix to sort as your endpoint youre hitting should NOT be returning malformed json.
ReadyAPI/SoapUI uses a json parser to read and recognise the json payload allowing you to assert or grab a value as a property, but the parser will only be able to read wellformed json. It wont work if its malformed.
Depending on how badly malformed the json is, you can use an event handler to alter the response payload to make it wellformed, but it's a little complicated and depends on how malformed the json payload is.
If you can publish the json payload so we can see it, we might be able to resolve to allow you to continue working, HOWEVER, your developers will still need to fix the json to make it wellformed anyway, cos this is definitely a defect.
Cheers,
Rich