JSON
- good for web services
- human readable format
- it uses javascript eval() function which may cause some security flaw as we can excecute the js object
XML
- good for configurations
- Using XPath path, we can directly access the element
- Using XSLT template, we can easily convert from Xml to json, csv or any format
You can go with either JSON or XML basing on your requirement. Many developers think that JSON object is a light weight and which is better than XML. But in my opinion both are same.
- good for web services
- human readable format
- it uses javascript eval() function which may cause some security flaw as we can excecute the js object
XML
- good for configurations
- Using XPath path, we can directly access the element
- Using XSLT template, we can easily convert from Xml to json, csv or any format
You can go with either JSON or XML basing on your requirement. Many developers think that JSON object is a light weight and which is better than XML. But in my opinion both are same.