Forum Discussion

rajs2020's avatar
rajs2020
Frequent Contributor
5 years ago

Why do ReadyAPI and SoapUI convert database result into XML ?

I see that ReadyAPI and SoapUI convert relational database result into XML. Why do they do that? If it is possible to convert it into JSON instead, then why do they don't do it?

  • Hey rajs2020,

    This is a complete guess on my part, but id suggest the reason is historic.

    Xml has been around a lot longer. I think json was only standardized quite recently (within the last decade) where xml's been knocking about for years.

    Im guessing Eviware (owners of SoapUI before Smartbear grabbed it) when they first added jdbc support to SoapUI, json wasnt standardized so the risk of making chsnges to its handling by altering it from xml to json just werent worth the risk of json never been stndardized and slipping into obscurity.

    Json advantages over xml just dont really add much incentive to switch from xml to json (e.g. a bit more lightweight, cos attribute names arent duplicated like they are in xml elements and datatypes are somewhat preserved in json where theyre not in xml...e.g. think numeric and text types. These are reflected by wrapping values in double quotes in json...this isnt done in xml).

    Personally i still struggle when im editing very complex json (i struggle with complex jsonpath), whereas i can spot malformed xml from a mile off.

    Ok. Thats just my guess/opinion and isnt necessarily true at all, but its the best guess i got!

    Cheers,

    Rich
  • richie's avatar
    richie
    Community Hero
    Hey rajs2020,

    This is a complete guess on my part, but id suggest the reason is historic.

    Xml has been around a lot longer. I think json was only standardized quite recently (within the last decade) where xml's been knocking about for years.

    Im guessing Eviware (owners of SoapUI before Smartbear grabbed it) when they first added jdbc support to SoapUI, json wasnt standardized so the risk of making chsnges to its handling by altering it from xml to json just werent worth the risk of json never been stndardized and slipping into obscurity.

    Json advantages over xml just dont really add much incentive to switch from xml to json (e.g. a bit more lightweight, cos attribute names arent duplicated like they are in xml elements and datatypes are somewhat preserved in json where theyre not in xml...e.g. think numeric and text types. These are reflected by wrapping values in double quotes in json...this isnt done in xml).

    Personally i still struggle when im editing very complex json (i struggle with complex jsonpath), whereas i can spot malformed xml from a mile off.

    Ok. Thats just my guess/opinion and isnt necessarily true at all, but its the best guess i got!

    Cheers,

    Rich
  • sonya_m's avatar
    sonya_m
    SmartBear Alumni (Retired)

    Hi rajs2020! I think that Richie provided a well-rounded response to your query.

    Do you have anymore specific questions in mind for the Community to answer? Let us know and the Community will try to help more.

  • rajs2020's avatar
    rajs2020
    Frequent Contributor

    sonya_m - I see that you liked the reply. Wondering if you had any additional comments. thanks.