Tag Archives: Serialization

C# Deserialize JSON to dynamic ExpandoObject()

The Microsoft System.Text.Json.Serialization.JsonSerializer cannot (yet) convert JSON into dynamic objects. But good ole Newtonsoft.Json can. The conversion is simple too: After the conversion, you can work with the dynamic object as you wish: MORE TO READ: How to serialize and … Continue reading

Posted in .net, .NET Core, c#, General .NET | Tagged , , , , | Leave a comment

C# Newtonsoft camelCasing the serialized JSON output

JSON love to be camelCased, while the C# Model class hates it. This comes down to coding style, which is – among developers – taken more seriously than politics and religion. But fear not, with Newtonsoft (or is it newtonSoft … Continue reading

Posted in .net, .NET Core, c#, General .NET | Tagged , , , , , | Leave a comment

Unable to serialize the session state. In ‘StateServer’ and ‘SQLServer’ mode

When switching the sessionState mode of your web project from InProc to SQLServer you might encounter this error: Exception: System.Web.HttpException Message: Unable to serialize the session state. In ‘StateServer’ and ‘SQLServer’ mode, ASP.NET will serialize the session state objects, and … Continue reading

Posted in c#, General .NET, Sitecore | Tagged , , , , , , | 2 Comments