JsonSerializer serializer = new JsonSerializer();
jw.WritePropertyName("info");
serializer.Serialize(jw, res);
if (res[2] == true)
{
jw.WritePropertyName("healer"); jw.WriteStartObject();
jw.WritePropertyName("running");
jw.WriteValue(res[1] == true ? (checkBox1.IsChecked == true ? true : false) : false);
jw.WritePropertyName("main"); jw.WriteStartObject();
serializer.Serialize(jw, new bool[] { true, true, true, true, true, true });
jw.WriteEndObject(); // here
jw.WriteEndObject();
}
有人可以告诉我为什么这段代码不起作用吗?没有线serializer.Serialize(jw, new bool[] {...}});
一切正常。