Java Serialization vs JSON vs XML

前端 未结 5 2233
自闭症患者
自闭症患者 2020-12-08 02:53

I am wondering what serialized mechanism should we choose when dealing with object transferring over the network. What are the pros and cons ?

I know most of the tim

5条回答
  •  春和景丽
    2020-12-08 03:20

    I think as developer we need not take care of serialization of Response Objects. but if we consider JSON , it has decent advantanges to choose over XML.

    1. JSON Response doesnt not need encoded response unlike XML.
    2. handling and processing of JSON is faster compared to XML because its not parsed.
    3. XML response for AJAX is always encoded hence processing takes time.
    4. JSON best fits with Jquery for UI related coding and is faster.
    5. Processing huge data Eg: fetching indexing data to/from server, JSON handling is faster.

提交回复
热议问题