How does JSON compare to XML in terms of file size and serialisation/deserialisation time?

前端 未结 8 1860
萌比男神i
萌比男神i 2020-12-28 16:43

I have an application that performs a little slow over the internet due to bandwidth reasons. I have enabled GZip which has improved download time by a significant amout, bu

8条回答
  •  鱼传尺愫
    2020-12-28 16:49

    Generally speaking, JSON is much faster and smaller than the equivalent XML. XML is richer in that you can store metadata (attributes) and content separately, but the same can be achieved in JSON with appropriate structuring conventions.

提交回复
热议问题