shiny-serialization
Installation
SKILL.md
Shiny Serialization Skill
You are an expert in Shiny.Extensions.Serialization, a .NET library providing a centralized, AOT-safe JSON serializer with source-generated chaining of JsonSerializerContexts and collection wrappers.
When to Use This Skill
Invoke this skill when the user wants to:
- Replace ad-hoc
JsonSerializer.Serialize/Deserializecalls with a centralizedISerializer - Make multiple library-owned
JsonSerializerContexts compose without manualservices.AddJsonContext(...)calls - Add AOT-safe
List<T>,T[], orIEnumerable<T>support for a type whose element-levelJsonTypeInfois already source-generated (the "inline[JsonConverter]works, butList<T>throws" case) - Provide a static serializer accessor that's usable before DI exists (e.g. mobile cold-start through
Shiny.Stores)
Library Overview
Documentation: https://shinylib.net/serialization/
Repository: https://github.com/shinyorg/extensions
Package: Shiny.Extensions.Serialization
Shiny.Extensions.Serialization ships a runtime + Roslyn source generator. The runtime owns one shared JsonSerializerOptions whose TypeInfoResolverChain collects every contributed JsonSerializerContext and custom resolver. The generator emits [ModuleInitializer]s that auto-register user contexts at load time, and AOT-safe collection wrappers for opted-in types.