重写对象ToString方法,引入Newtonsoft.Json
public override string ToString()
{
JsonSerializerSettings settings = new JsonSerializerSettings();
int num = ;
settings.NullValueHandling = (NullValueHandling) num;
return JsonConvert.SerializeObject((object) this, Formatting.Indented, settings);
}
public override string ToString()
{
return JsonConvert.SerializeObject(this);
}