There is no way to supply a custom serializer in ApiClient. While there exists the 'serializerSettings' member, there are two issues with this:
this is not use as input to JsonConvert.Serialize() during serialization
the serializerSettings member is private and there is no way of setting it in a constructor.
Additionally, one would think that ApiClient.RestClient.UseSerializer<T> (or the Newtonsoft extension UseNewtonsoftJson) would have an effect but this is completely unused in ApiClient.
Proposed fixes:
Add a ctor to allow overload for serialization settings and use that.
Use the serializer in the RestClient
Note: callers can work around this by configuring newtonsoft's default serializer options but this is error prone and affects the whole process.
Also faced with serialization issue.
In a project used System.Text.Json serialization
And after calling start workflow API
Got this instead of string values )
See this line for details.
There is no way to supply a custom serializer in ApiClient. While there exists the 'serializerSettings' member, there are two issues with this:
serializerSettings
member is private and there is no way of setting it in a constructor.Additionally, one would think that
ApiClient.RestClient.UseSerializer<T>
(or the Newtonsoft extensionUseNewtonsoftJson
) would have an effect but this is completely unused in ApiClient.Proposed fixes:
Note: callers can work around this by configuring newtonsoft's default serializer options but this is error prone and affects the whole process.