JSON or XML? Which is better? [closed]
Choose XML if
- An industry standard XSD exists.
- You value more mature validation standard and tools.
- You need to transform the data to another XML form. (XSLT is excellent for transformations.)
- Or, you have to represent mixed content (tags mixed within text).
Choose JSON if
- The closer fit to JavaScript is valuable to you or your callers.
- You prefer a lighter-weight solution.
- Or, the above Choose XML if reasons do not apply to you.