Java Serialization vs JSON vs XML

前端 未结 5 2251
自闭症患者
自闭症患者 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:25

    I once attended a security engineer training, it's not recommending using Java native serialization due to some security weakness on the Java native deserialization side which can accept any (potentially injected malicious) byte streams. Also XML has a known security issue when definition/schema is not defined correctly, which is called XXE (XML Enternal Entities). It may cause "billion laugh" attack on the consuming side.

提交回复
热议问题