public partial class json序列化 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
StringBuilder builder = new StringBuilder();
builder.Append("{");
builder.Append(" \"CommonConfig\": {");
builder.Append(" \"ChannelDepartmentCode\": \"9904\"");
builder.Append(" }");
builder.Append("}");
JavaScriptSerializer jsonSerializer = new JavaScriptSerializer();
PageConfig t = jsonSerializer.Deserialize<PageConfig>(builder.ToString());
}
}
public class PageConfig
{
public CommonConfig CommonConfig { get; set; }
}
public class CommonConfig
{
public string ChannelDepartmentCode { get; set; }
}