Created
June 7, 2019 13:34
-
-
Save edqwerty1/cc0cad485356c233284d6391dfd73843 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class WebApiHelpers | |
{ | |
public static string ToJson(Object model) | |
{ | |
var serializerSettings = new JsonSerializerSettings | |
{ | |
ContractResolver = new CamelCasePropertyNamesContractResolver() | |
}; | |
return JsonConvert.SerializeObject(model, serializerSettings); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment