Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Introduction

The .NET framework offers two methods of serialization, namely, binary serialization and XML serialization. Binary serialization preserves the state of the object between different invocations of an application by preserving type fidelity. XML serialization uses XML as an open standard to serialize only the public properties and fields. It does not preserve type fidelity but provides support for serialization in human-readable, cross-platform XML. The framework provides many options to customize the serialization process to meet application requirements.

Xsd2code++ takes care of adding the set of attributes that are necessary for serialization/deserialization process, but also the serialization methods in memory or on disk. Serialization is a process that has many options and subtleties. This is why xsd2code++ brings a simple solution to automatically integrate these mechanisms into your classes without you having to worry about it.


Binary serialization and XML are integrated into the Dotnet FrameWork, you have no additional libraries to reference in your project. Xsd2code++ allows serialization through other solutions. As is NewtonSoft.JSON, MessagePack. In this case external libraries must be added to your project.


To summarize the different serialization possibilities are :


To enable the generation of serialization methods, you must activate the option in the Serialization section as shown below :

Then many parameters are available to customize method names, encoding, conditional serialization mechanisms. These options are described in the chapters below:

XML Serialization

JSon Serialization

MsgPack serialization

BSon serialization





  • No labels