-4

Which format is better to save and access data for a web application?

Is JSON more flexible or should XML be used?

PrajD
  • 125
  • 1
  • 3
  • 15

1 Answers1

3

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.
kjhughes
  • 106,133
  • 27
  • 181
  • 240