I'd like to know what is the serialization format of the BinaryFormatter. I found this site which give some good informations, but it was obtained by reverse engineering and it is not complete.
Where can I find the official specification of the BinaryFormatter serialization format?
Formatters. Binary Namespace. Contains the BinaryFormatter class, which can be used to serialize and deserialize objects in binary format.
Due to security vulnerabilities in BinaryFormatter, the following methods are now obsolete and produce a compile-time warning with ID SYSLIB0011 . Additionally, in ASP.NET Core 5.0 and later apps, they will throw a NotSupportedException, unless the web app has re-enabled BinaryFormatter functionality.
Serialization is the process of converting an object into a stream of bytes to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization.
Binary serialization allows modifying private members inside an object and therefore changing the state of it. Because of this, other serialization frameworks, like System. Text. Json, that operate on the public API surface are recommended.
[MS-NRBF]: .NET Remoting: Binary Format Data Structure
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With