cancel
Showing results for 
Search instead for 
Did you mean: 

[Resolved] Json Slurper + backslashes + Groovy support

Occasional Contributor

[Resolved] Json Slurper + backslashes + Groovy support

I am running into an issue with JSON slurper where its causing an exception in my script assertion.
My JSON response has back slashes in it and apparently is causing the issue.

There was a defect, apparently filed and fixed: http://jira.codehaus.org/browse/GROOVY- ... l-tabpanel
but that was approximately 2 years ago.

I understand JSON Slurper is not your product, but was curious if any of your engineers have heard of this problem with a Groovy script assertion.

Script Assertion code:
import groovy.json.JsonSlurper
def response = messageExchange.response.responseContent
def slurper = new JsonSlurper()
def json = slurper.parseText response

Output:
Expected a value on line: 1, column: 631.
But got an unterminated object.

I verified the response was valid JSON as well.

Thanks for any thoughts,

Craig
5 REPLIES 5
Community Expert

Re: Json Slurper + backslashes + Groovy support

Occasional Contributor

Re: Json Slurper + backslashes + Groovy support

Thank you
New Contributor

Re: Json Slurper + backslashes + Groovy support

wrong link, what the solution of that problem ?

New Contributor

Re: Json Slurper + backslashes + Groovy support

please, what the solution ?

Community Hero

Re: Json Slurper + backslashes + Groovy support

@razinkovaleksey: Please start a new thread and explain your problem. The thread you replied to is almost 4 years old. 




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
New Here?
Join us and watch the welcome video:
Read the Latest News
NovemberNews
Top Kudoed Authors