amis92 / csharp-source-generators

A list of C# Source Generators (not necessarily awesome) and associated resources: articles, talks, demos.
Creative Commons Zero v1.0 Universal
2.03k stars 202 forks source link

Add SerdeDn project #53

Closed atifaziz closed 3 years ago

atifaziz commented 3 years ago

Adds SerdeDn (serde-sn), which is a port of the popular serde.rs Rust serialization/deserialization library to .NET.

Like Serde, SerdeDn is a framework for types which control how they serialize themselves. Basic cases are fully automated using a C# source generator. It has no reflection or run-time dispatch so it's trimming and AOT friendly. It is high-performance—the built-in JsonSerializer is as fast or faster than System.Text.Json, and much faster than Newtonsoft.Json.

SerdeDn is also modular. Any type can control how it will be serialized, and 3rd-party output serializers can be provided for any output format. A JSON serializer is provided as the only built-in output format.

About serde-dn

/cc @agocke