Open liuliang-wt opened 1 year ago
Hi @liuliang-wt,
I've reviewed the issue you opened regarding the IEndpointContentSerializerSettingsProvider
and its support for System.Text.Json
. I understand your concern about integrating Elsa with applications that use System.Text.Json
as the default serializer, especially when there are custom converters in place.
I'm not sure how changing the serializer settings for Elsa API endpoints will solve the issue, because if you modify these settings, it might potentially break the designer. However, I appreciate your insights and suggestions on the matter. If you believe you have a solution that can seamlessly integrate both serializers without causing disruptions, you're welcome to try and submit a PR. We're always open to contributions that can enhance the functionality and compatibility of Elsa.
Thank you for bringing this to our attention.
I submitted a pr #4430 , take a look please
My .netcore app is using System.Text.Json as the default serializer, when integrate with Elsa which use NewtonSoft.json, my app will broke because I have many custom converter for System.Text.Json.
I read Elsa's souce code, I found this IEndpointContentSerializerSettingsProvider may solve my problem, but this interface declares this method : JsonSerializerSettings GetSettings(); It should return Object, so that when I set the system to use System.Text.Json, I can inject this Interface using System.Text.Json.JsonSerializerOptions.