أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
JSON,
Because JSON is simple and more readable, it is easy to handle JSON data more than xml format. And JSON is fast enough than xml for small amount of data.
Also it depends upon the data you want touse.
If data is in the form of objects then JSON is preeferred But if the data is in the document/file form and big amount of data then we can use xml.
It totaly depends on the application you are dealing with, comlexity of the data and how light you need the data to be JSON is lighter but for complex data XMl might be a better choice as XML’s strength is extensibility and the avoidance of namespace clashes. It holds any data type and can be used to transport full documents with formatting information included. XML is best used when transporting something like a patient chart or text document with markup included.
JSON is purposefully limited and therefore much lighter than XML. I suspect that, most of the time, data can be modeled with hashes and lists comprising simple data types, making JSON the preferred route.
it depends if you are using java script sure json is the best choice if you are dealing with databases and web services for example asp.net xml is your optimum choice