Deserialization risks in use of BinaryFormatter and related types | Microsoft Learn

Warningย 

The BinaryFormatter type is dangerous and is not recommended for data processing. Applications should stop using BinaryFormatter as soon as possible, even if they believe the data they're processing to be trustworthy. BinaryFormatter is insecure and can't be made secure.

์ฝ์„ ๋•Œ ์œ„ํ—˜ํ•˜๋Œ€


Preferred alternatives

XmlSerializer and DataContractSerializer to serialize object graphs into and from XML. Do not confuse DataContractSerializer with NetDataContractSerializer.

BinaryReader and BinaryWriter for XML and JSON.

The System.Text.Json APIs to serialize object graphs into JSON.


XML, Json, BinaryReader/ BinaryWriter ์“ฐ๋ž˜


json ์ด๋‚˜ ์จ์•ผ๊ฒ ๋‹ค