C# Record Serialization

Posted by Joe Enos on December 08, 2020 · 1 min read

With .NET 5, you get a new concept called record. Lots of cool things, one of which is that you can serialize and deserialize with JSON just like a class, except you don’t need to define properties one at a time, or even the body of the type.

Apparently XML serialization doesn’t quite work, so stick with JSON.

View code on GitHub