我今天尝试将匿名对象转换为JSON对象,但是当我解析转换结果时,它说JSON无效。我不知道为什么会这样做。任何帮助将非常感激。干杯!
Handler
创建的json:
var s = new
{
displayName = "ppplll",
description = "Self help community for library",
groupTypes = new[] { "Unified" },
mailEnabled = true,
mail = "emali@abc.com",
mailNickname = "library",
securityEnabled = false
};
JavaScriptSerializer js = new JavaScriptSerializer();
string json = js.Serialize(s);