Ask a Question

"class" in JSON wrongly interpreted?

obruxelle
Occasional Visitor

"class" in JSON wrongly interpreted?

Hello,

while working on SoapUI 5.6.0, we are facing issues with the content of the reply in the JSON tab being different from the Raw tab.

Raw data with key "class" well returned:

obruxelle_2-1637076258291.png

 

While in JSON the "class" key is missing:

obruxelle_1-1637076110181.png

Is there a way to avoid this or is this a bug of SoapUI interpreting the "class" key?

 

Thanks for your help.

1 REPLY 1
richie
Community Hero

Hey @obruxelle 

 

well - I never saw an issue in SoapUI like that before!  I think that's a defect.

 

I'm assuming the RAW is correct and the JSON tab is incorrect?

 

I'm wondering if you'd still get the problem if you forced the response to be in XML instead of json?  perhaps there's an issue with the jsonparser that's the cause of this (probably not - cos it displays ok in the RAW I'm guessing....) - but still.

 

If on your request (that generates this weird response), you add in an 'Accept' header with the value 'application/xml' - this will force the response to be returned with Content-Type header value of application/xml (payload will be xml).  I'm wondering if you'd still get this disparity you're seeing if you use the xmlparser rather than the jsonparser?

 

Worth a try maybe?   you're not really losing anything shifting from one to another....

 

ta

 

Rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
cancel
Showing results for 
Search instead for 
Did you mean: