Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Configure SerializerSettings.ContractResolver

$
0
0

Hello ,

  •  I have write the following code in the "ConfigureServices" method :

            services.AddMvc().AddJsonOptions(opt =>{
                      opt.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
                      opt.SerializerSettings.ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver();
           });

        how can we implement this ?

    Thanks,

      Ibrahim

        


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>