XML and JSON — Advantages and Disadvantages?

前端 未结 8 755
遥遥无期
遥遥无期 2020-12-22 22:12

I recently heard about JavaScript Object Notation (JSON), and after looking it up, it seems like it\'s becoming rather popular as an alternative to the Extensible Markup Lan

8条回答
  •  天命终不由人
    2020-12-22 22:50

    They're equally expressive formats. JSON is less verbose. JSON can be parsed easily in JavaScript (and other languages), and XML is parsed easily by many things too.

    I think the most important consideration is what will be consuming the data - if you already have a bunch of XML-interpreting code, stick with that. If all your clients are web developers, go with JSON.

提交回复
热议问题