Rishim
Rishim

Reputation: 53

JSON array in response getting converted to JSON object

I am facing an issue in Karate where I am expecting a Json array in response but it is getting converted to Json object. All JsonArray parenthesis "[" are getting converted as "{" and being treated as Json objects.

No issue with SOAP UI.

Upvotes: 3

Views: 140

Answers (1)

shivam
shivam

Reputation: 71

@Rishim, use string instead of def, e.g:

* string somevar = response

Hope it works, I also did the same thing and get the value using jsonpath. Also, if possible please share example where you facing this issue.

Upvotes: 1

Related Questions