3

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.

3
  • 2
    @Rishim, When an answer has been helpful to you, or answers your question you should upvote it and mark it as complete. There are alot of niche markets in programming and you're requesting help from experts who invest their time into answering your question. its proper etiquette, complete questions, It helps the user and more importantly It helps the forum, because questions are found easier, and it clears up the front page for questions which actually need answers. Commented Jul 24, 2019 at 21:37
  • I understand... I tried using the upvote but since I do not have enough credits it didn’t post... however I left the thanks comments! Please don’t think that I don’t value their time . It’s a great forum and I truly appreciate the efforts from all members! Commented Jul 24, 2019 at 23:35
  • @Rashim, It looks like the original user deleted their comments about this, I was just here to mitigate a resolution, You should have enough credits to upvote mark as resolved now. Please make sure you handle you old questions ;) Commented Jul 25, 2019 at 14:36

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your reply. Unfortunately it didn't work. I am getting the response from server using get operation. The Json response has Json arrays but they are getting converted to Json objects . I am getting a "response" object from server which has json arrays. How do I ensure that Json arrays remain in response ?
can you share the response getting from server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.