Forum Discussion

Teddy_Liu's avatar
Teddy_Liu
Occasional Contributor
16 years ago

Testing a rest request in json

I am testing a rest api. And the request and response are written in json. So i need to select the item from the response.
for example

{"example":
{"test":"it is a test",
  "test2":"testing"
}
}

My question is, how can i get the information like  "test", because xpath or xquery could not be used for json.
Btw, i am using soapui 2.5.1

Thanks in advance!!
  • Hello,

    soapUI converts JSON (among other formats) into XML, allowing you to use the standard XML tools available, such as XPath or XQuery. When viewing the response, take a look at the XML view. The structure will be a little bit different from the raw JSON response, but all the data will be there.

    Regards,
    Dain
    eviware support