About 251,000 results
Open links in new tab
  1. Serialization - .NET | Microsoft Learn

    Oct 25, 2023 · This article provides information about .NET serialization technologies, including binary serialization, XML and SOAP serialization, and JSON serialization.

  2. How to use source generation in System.Text.Json - .NET

    By default, both source generation modes (metadata-based and serialization optimization) are used if you don't specify one. For information about how to specify the mode to use, see …

  3. How to serialize JSON in C# - .NET | Microsoft Learn

    Use AI to serialize to JSON You can use AI tools, such as GitHub Copilot, to generate code that uses System.Text.Json to serialize to JSON. You can customize the prompt to fit your object …

  4. How to customize property names and values with System.Text.Json

    Update #ClassName: when the property name contains more than one word, change the serialized property name to use underscores between words. Use built-in serialization …

  5. How to write custom converters for JSON serialization - .NET

    Learn how to create custom converters for the JSON serialization classes that are provided in the System.Text.Json namespace.

  6. Details of XML serialization - .NET | Microsoft Learn

    Serialization converts an object into a form that can be transported. This article provides an overview of XML serialization and the XmlSerializer class.

  7. How to serialize properties of derived classes with …

    Serialize properties of derived classes Beginning with .NET 7, System.Text.Json supports polymorphic type hierarchy serialization and deserialization with attribute annotations.

  8. How to ignore properties with System.Text.Json - .NET

    To prevent serialization of default values in value type properties, set the DefaultIgnoreCondition property to WhenWritingDefault, as shown in the following example:

  9. Custom serialization and deserialization contracts - .NET

    Jun 16, 2023 · The following list shows just some examples of the types of customizations you can make to serialization and deserialization: Serialize private fields and properties.

  10. Serialize object to XML by Visual C# - C# | Microsoft Learn

    May 8, 2022 · Serialization is the process of taking the state of an object and persisting it in some fashion. The .NET Framework includes powerful objects that can serialize any object to XML.