ODataHttpClient icon indicating copy to clipboard operation
ODataHttpClient copied to clipboard

Is it support odata open type ?

Open dks07 opened this issue 3 years ago • 1 comments

Is it support odata open type out of the box as Newtonsoft json serialize and deserialize does not support it ?

Is there any special serialization setting which we need to provide ?

dks07 avatar Feb 07 '22 04:02 dks07

@dks07 You can implement custom json serializer and replace default serializer instance.

public class MySerializer :  ODataHttpClient.Serializers.IJsonSerializer {}
public static void Main() {
   ODataHttpClient.Serializers.JsonSerializer.Default = new MySerializer();
}

However, I think Response.ReadAs<Type>("<json path>") is enough at various use cases.

If you can write your json response payload, I may help you more.

iwate avatar Feb 16 '22 09:02 iwate