You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While Acceptance and Integration testing using PostContentAsync method, I was going through the source code and I see a dependency to serialize using Newtonsoft JsonSerializerSettings (in ConvertToJsonStringContent within RESTFulApiFactoryClient).
In case the underlying object uses System.Text.Json JsonPropertyName Attribute . Those json settings are ignored, and I get BadRequest Error..
I tried handcrafting the object using ExpandoObject() with desired serialized property names and it worked.
In case the underlying "Type" uses System.Text.Json then serialization should honor System.Text.Json serialization logic instead of defaulting to Newtonsoft
The text was updated successfully, but these errors were encountered:
This could be done with the new version which will be released soon. It allows to specify a func to serialize/deserialize with a different one than NewtonSoft.
While Acceptance and Integration testing using PostContentAsync method, I was going through the source code and I see a dependency to serialize using Newtonsoft JsonSerializerSettings (in ConvertToJsonStringContent within RESTFulApiFactoryClient).
In case the underlying object uses System.Text.Json JsonPropertyName Attribute . Those json settings are ignored, and I get BadRequest Error..
I tried handcrafting the object using ExpandoObject() with desired serialized property names and it worked.
In case the underlying "Type" uses System.Text.Json then serialization should honor System.Text.Json serialization logic instead of defaulting to Newtonsoft
The text was updated successfully, but these errors were encountered: