Last Updated: 08 Dec 2022 14:13 by kdubious
Created on: 11 Feb 2021 11:03
Type: Feature Request
Migrate to System.Text.Json for serialization, instead of using Newtonsoft.Json

I have projects on .NET Core and I want to use the System.Text.Json serializer that is the new default, but reporting relies on Newtonsoft.Json.



There are two approaches that can be taken right now to solve this:

OPTION 1: define separate endpoints (services, projects) for the different tasks - they can still use the same database layer through a shared project, depending on the architecture you have. This would let you have separated services with the appropriate serializers without custom attributes and code (see below). For example, create a separate project for the reporting REST services.

OPTION 2: add some custom decoration on the endpoints so you can choose which serializer is used on each, you can find some examples here: https://stackoverflow.com/questions/59650907/how-to-configure-two-json-serializers-and-select-the-correct-one-based-on-the-ro - the point being to register a serializer depending on the endpoint based on your own code rather than let the framework put one in for all endpoints.

NOTE: This would be a breaking change.


1 comment
Posted on: 08 Dec 2022 14:13

>> NOTE: This would be a breaking change.

Understood. But without this fix, one cannot use Kendo and Telerik Reporting in the same .NET6 app.