Forum Discussion

groovynoob's avatar
groovynoob
Occasional Contributor
12 years ago

SoapUI/JSONSlurper can't parse Cyrillic?

Hey folks,

I've been working on an issue where I'm sending a request to a service which then translated some data from one language to another. However, that response comes back in Russian (cyrillic?), but standard XML readers and JSONSlurper can't read the response since it's breaking on a certain characters.

Am I simply looking at incorrect encoding? I am new to how all this applies, and I've attempted to set encoding on the test step property to UTF-8, as well as adding a header to the request to specify UTF-8 encoded responses, but neither of those appears to have any effect. My assertion begins as follows:


import groovy.json.JsonSlurper

def xresponse = messageExchange.response.contentAsString
def slurper = new JsonSlurper()
def result = slurper.parseText(xresponse)


Obviously, not the whole assertion...

The error that is returned is "Expected a value on line 2; column: 1.But got an unterminated object."

Any help on this issue would be appreciated,

groovynoob
  • koteno4ka's avatar
    koteno4ka
    Occasional Contributor
    i got the same error - cant parse response with cyr character, the same error
  • koteno4ka's avatar
    koteno4ka
    Occasional Contributor
    nmrao wrote:
    Are you still living with this issue?
    the same (