Serialize json property names first letter lowercase solutions

// returns the interface automatically transferred lowercase, easily cause inconsistent end, not obtain the data transfer is switched to the hump (initials) as Code / Result
// configuration in ConfigureServices
services.AddMvc().AddJsonOptions(options => { options.SerializerSettings.ContractResolver = new DefaultContractResolver(); }).SetCompatibilityVersion(CompatibilityVersion.Version_2_2);

 

Guess you like

Origin www.cnblogs.com/mobaiyu/p/11199186.html