Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSON array in response getting converted to JSON object

Tags:

karate

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.

like image 379
Rishim Avatar asked May 14 '26 10:05

Rishim


1 Answers

@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.

like image 162
shivam Avatar answered May 16 '26 23:05

shivam