3

I have a class structure:

public class main
{
derived[Serializable]
    public class Parameters: Service.Parameters {
        public bool a { get; set; }
        public string b { get; set; }
   }
}

I am using:

string jsonSerializedObject = JsonConvert.SerializeObject(model.Parameters, Formatting.None, new JsonSerializerSettings
            {
                TypeNameHandling = TypeNameHandling.Objects,

            });   

But the properties a and b not being serialized. Any idea would be great Thank you

ozges
  • 31
  • 3
  • this might help you http://stackoverflow.com/questions/8513042/json-net-serialize-deserialize-derived-types – ltiveron Oct 07 '16 at 14:19

0 Answers0