C# Record Serialization

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

Leave a Reply

Your email address will not be published.