Use ConfigureExternalJsonOptions in FwLiteJson - #2528
Conversation
Switch FwLiteJson.ConfigureJsonSerializerOptions to call harmonyConfig.ConfigureExternalJsonOptions instead of manually adding harmonyConfig.MakeJsonTypeModifier, matching the pattern used in FwLiteWebKernel and LcmCrdt.Json. This lets Harmony add both its type-info modifier and change converter for IChange/IObject polymorphism. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VzhApSCWEWcL9E5wjuneqC
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe JSON serializer configuration now delegates external option setup to ChangesJSON serializer configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Fix a change missed when migrating
🤖 AI-generated summary
FwLiteJson.ConfigureJsonSerializerOptionsnow callsharmonyConfig.ConfigureExternalJsonOptions(options)instead of manually layering onharmonyConfig.MakeJsonTypeModifier().The previous code only added Harmony's JSON type-info modifier.
ConfigureExternalJsonOptionsdoes that and wires up Harmony's change converter, giving fullIChange/IObjectpolymorphism support soChangeEntity<IChange>fields round-trip correctly.This aligns the Blazor/JSInterop serializer setup with the pattern already used elsewhere in the codebase:
FwLiteWeb/FwLiteWebKernel.cs(ASP.NETJsonOptions)LcmCrdt/Json.cs(MakeLcmCrdtExternalJsonOptions)MakeJsonTypeModifierhas no remaining call sites in the repository after this change.Test plan
FwLiteShared(and dependentsFwLiteMaui/FwLiteWeb) — not yet compiler-verified in this environmentChangeEntity<IChange>fields round-trip correctly