I have a class that contains an enum property, and upon serializing the object using JavaScriptSerializer, my json result contains the integer valu
enum
JavaScriptSerializer
Here is the answer for newtonsoft.json
enum Gender { Male, Female } class Person { int Age { get; set; } [JsonConverter(typeof(StringEnumConverter))] Gender Gender { get; set; } }