Version 4.0.0 removes the dependency onDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ServiceComposer/ServiceComposer.AspNetCore/llms.txt
Use this file to discover all available pages before exploring further.
Newtonsoft.Json and replaces it with the built-in System.Text.Json. This delivers a leaner dependency graph and aligns ServiceComposer with the standard ASP.NET Core serialisation stack. The change also necessitates a switch in the default view model type, because System.Text.Json cannot serialize DynamicObject.
Remove Newtonsoft.Json dependency
ServiceComposer no longer depends on
Newtonsoft.Json. If your project references it solely to configure ServiceComposer serialisation, you can remove the package reference. If other parts of your application still require Newtonsoft, keep the reference but remove any ServiceComposer-specific configuration that relied on it.Adjust for ExpandoObject default view models
System.Text.Json does not support serializing types that inherit from DynamicObject. The default view model has therefore changed from a custom DynamicObject subclass to ExpandoObject.This change should have no impact on most user code, because all previously-supported view model features (raising events, accessing request IDs, etc.) were already moved to
ICompositionContext in v3.DynamicViewModel.Merge(dynamic) method is no longer supported. If your handlers relied on merging two view models, refactor that logic to populate the ExpandoObject view model directly via the composition context.Update custom serialization options
If you were using
UseCustomJsonSerializerSettings to supply a JsonSerializerSettings instance (Newtonsoft), update the call to supply a Func<HttpRequest, JsonSerializerOptions> factory (System.Text.Json) instead. The method is accessed via options.ResponseSerialization: