One of the major, recurring complaints of the OData.NET libraries is the performance overhead of the serialization stack. We have done a lot of work to improve the serialization performance, but the existing architecture limits how far we can go. For this reason, we have started work on a new serialization stack for OData.NET libraries that addresses major performance concerns and also makes general improvements to usability. We plan to ship this new serializer as part of Microsoft.OData.Core 9.x library (the next major release) under a new namespace as an alternative to the existing ODataMessageWriter and ODataMessageReader.But you don't have to wait for Microsoft.OData.Core 9.x release, we have shipped the preview release to NuGet of the serializer as standalone package Microsoft.OData.Serializer so you can start testing it and sharing feedback with us. Let's write a quick demo to show how it works. To get started, create a new .NET Console application with .NET 8 or later. AddMicrosoft.OData.Core package from NuGet. You can use either versions 8.x or 9.x preview. Depending on your version of Microsoft.OData.Core, you may also need to add the Microsoft.Extensions.DependencyInjection.Abstractions package from NuGet. Add Microsoft.OData.Serializer package from NuGet. The latest version is 0.1.0-preview.1 at the time of this writing. If using Visual Studio, make sure to **Include prerelease** versions in your package search.Then write the following code in your Program.cs file:// Setup EDM model that describes the OData servicevar csdlSchema =""" """;var xmlReader = XmlReader.Create(new StringReader(csdlSchema));IEdmModel model = CsdlReader.Parse(xmlReader);// OData URI determines the kind of payload being requestedvar odataUri = new ODataUriParser( model, new Uri("http://localhost/odata"), new Uri("Products", UriKind.Relative)) .ParseUri();// Prepare payload to writeList products = [ new Product { ID = 1, Name = "Laptop", Description = "A high-performance laptop.", IsAvailable = false, Price = 999.99m }, new Product { ID = 2, Name = "Smartphone", Description = "A latest model smartphone.", IsAvailable = true, Price = 699.99m }];// Initialize serializer optionsvar serializerOptions = new ODataSerializerOptions();// Write the output to the consoleusing var outputStream = Console.OpenStandardOutput();await ODataSerializer.WriteAsync(products, outputStream, odataUri, model, serializerOptions);Console.ReadKey();[ODataType("ODataDemo.Product")]class Product{ public int ID { get; set; } public string Name { get; set; } public string Description { get; set; } [ODataPropertyName("InStock")] public bool IsAvailable { get; set; } public decimal Price { get; set; } public int Version { get; set; } // Skipped because it's not in the schema}When you run the application, it should print output similar to the following (pretty-printed for clarity):{ "@odata.context": "http://localhost/odata/$metadata#Products", "value": [ { "ID": 1, "Name": "Laptop", "Description": "A high-performance laptop.", "InStock": false, "Price": 999.99 }, { "ID": 2, "Name": "Smartphone", "Description": "A latest model smartphone.", "InStock": true, "Price": 699.99 } ]}