Forum Discussion

CamillaR's avatar
CamillaR
Occasional Contributor
4 years ago

Showing json response as xml, wrong value in xmlns

Hi,   I test a REST-service that respond with a json. My request: GET https://develop-sys.test.abc.se/mom/19820224/201907 The json response looks fine, both i tab "JSON" and tab "Raw": { "perio...
  • richie's avatar
    4 years ago
    Hey CamillaR,

    I suspect the issue is a cpnsequence of readyapi trying to convert your json response i to xml. If your datatype (Content-Type header) is json (e.g. application/json) readyapi converts your json responseto xml, and that is what your seeing.

    The xmlns attribute is typically includedin a schema and can have any value. Itsjust used so the elememts can have unique identifiers (nsmespace prefix). Your xmlns attribute doesnt include a prefix value so this is a default namespace.
    All thatboring stuff aside, you can ignore the contents of the xml tab if your content is json anyway.

    Hope this helps explain,

    Ta

    Rich