ServiceComposer.AspNetCore

Upgrade guide from v3.x to 4.0.0

Contents

System.Text.Json support

The dependency on Newtonsoft.Json has been removed in favor of using the built-in System.Text.Json. Starting v4, ServiceComposer uses System.Text.Json to serialize view models to HTTP responses.

Default view models use ExpandoObject instead of DynamicObject

System.Text.Json doesn’t support serializing DynamicObject. The default view model is now ExpandoObject, instead of a custom class inhering from DynamicObject. This change should have no effects on user code as all previously-supported view model features were moved to the ICompositionContext in v3.

Merging two view models using the DynamicViewMode.Merge(dynamic) method is not supported anymore.

Custom serialization options

The UseCustomJsonSerializerSettings option now uses an instance of JsonSerializerOptions.