serialization
✓Choose the right serialization format for .NET applications. Prefer schema-based formats (Protobuf, MessagePack) over reflection-based (Newtonsoft.Json). Use System.Text.Json with AOT source generators for JSON scenarios.
Installation
SKILL.md
| Examples | Protobuf, MessagePack, System.Text.Json (source gen) | Newtonsoft.Json, BinaryFormatter | | Type info in payload | No (external schema) | Yes (type names embedded) | | Versioning | Explicit field numbers/names | Implicit (type structure) | | Performance | Fast (no reflection) | Slower (runtime reflection) | | AOT compatible | Yes | No |
Recommendation: Use schema-based serialization for anything that crosses process boundaries.
| REST APIs | System.Text.Json (source gen) | Standard, AOT-compatible | | gRPC | Protocol Buffers | Native format, excellent versioning | | Actor messaging | MessagePack or Protobuf | Compact, fast, version-safe | | Event sourcing | Protobuf or MessagePack | Must handle old events forever | | Caching | MessagePack | Compact, fast |
Facts (cite-ready)
Stable fields and commands for AI/search citations.
- Install command
npx skills add https://github.com/aaronontheweb/dotnet-skills --skill serialization- Category
- </>Dev Tools
- Verified
- ✓
- First Seen
- 2026-02-06
- Updated
- 2026-02-18
Quick answers
What is serialization?
Choose the right serialization format for .NET applications. Prefer schema-based formats (Protobuf, MessagePack) over reflection-based (Newtonsoft.Json). Use System.Text.Json with AOT source generators for JSON scenarios. Source: aaronontheweb/dotnet-skills.
How do I install serialization?
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/aaronontheweb/dotnet-skills --skill serialization Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor
Where is the source repository?
https://github.com/aaronontheweb/dotnet-skills
Details
- Category
- </>Dev Tools
- Source
- skills.sh
- First Seen
- 2026-02-06