Skip to main content

system-text-json-source-generation-aot

Use when System.Text.Json runs under Native AOT or trimming (PublishAot / PublishTrimmed), or when you want the faster, reflection-free serialization path — i.e. a JsonSerializerContext with [JsonSerializable]. Reflection-based JsonSerializer compiles but THROWS at run time under AOT; the source generator is the only supported path. Also covers configuring a context with [JsonSourceGenerationOptions] and why naming policy is per-context, not per-model, so one type serialized by two contexts can emit two different spellings, plus word-valued enums that must remain trim/AOT-safe.

Jump to install

Source facts

Repository
richlander/dotnet-package-skills
Last source activity
August 18, 2026 at 02:50
Detected SKILL.md language
English
Stars
1
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.