Answers for "jsonserializersettings camelcase"

0

jsonserializersettings camelcase

DefaultContractResolver contractResolver = new DefaultContractResolver
{
    NamingStrategy = new CamelCaseNamingStrategy()
};

string json = JsonConvert.SerializeObject(user1, new JsonSerializerSettings
{
    ContractResolver = contractResolver,
    Formatting = Formatting.Indented
});
Posted by: Guest on August-13-2021

Browse Popular Code Answers by Language