-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] [bidi] JsonSerializerContext instance per module #16649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dotnet] [bidi] JsonSerializerContext instance per module #16649
Conversation
…eneral BiDi extensinos
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
|
Perfect! Now we can think about how to split big |
User description
Preparation for separate JsonSerializerContext per each Module.
💥 What does this PR do?
DefaultJsonOptions()inBiDiclassJsonOptionsacross modules, meaning each module may modify options (like adding custom converters)🔄 Types of changes
PR Type
Enhancement
Description
Refactor JSON context initialization to per-module pattern
Hide
GetJsonOptions()as internal method in BiDi classReplace
CreateJsonContext()withInitialize()void methodSimplify module creation by removing JsonOptions parameter passing
Each module now manages its own JsonSerializerContext instance
Diagram Walkthrough
File Walkthrough
15 files
Hide GetJsonOptions and simplify module initializationRemove JsonSerializerOptions parameter from constructorReplace CreateJsonContext with Initialize void methodImplement Initialize method with private _jsonContext fieldImplement Initialize method with private _jsonContext fieldImplement Initialize method with private _jsonContext fieldImplement Initialize method with private _jsonContext fieldImplement Initialize method with private _jsonContext fieldImplement Initialize method with private _jsonContext fieldSimplify module creation call without JsonOptionsImplement Initialize method with private _jsonContext fieldImplement Initialize method with private _jsonContext fieldImplement Initialize method with private _jsonContext fieldImplement Initialize method with private _jsonContext fieldImplement Initialize method with private _jsonContext field