You can serialize and deserialize record objects with JSON the same way as you can with classes, except the record definition is much shorter and more concise.
Blog entry:
https://www.60second.dev/2020/12/c-record-serialization.html
View code on GitHub:
https://github.com/jtenos/60-second-dev/tree/main/2020-12-08%20c%23%20record%20serialization
Comments are closed.