尝试序列化对象产品时出现错误。Newtonsoft.json抛出错误:数组不是一维数组
Product product = new Product();
product.Name = "Apple";
product.Expiry = new DateTime(2008, 12, 28);
product.Price = 3.99M;
product.Sizes = new string[3,2] { {"Small","40"}, {"Medium","44"}, {"Large","50"} };
string json = JsonConvert.SerializeObject(product);//this line is throwing an error
Array was not a one-dimensional array
有没有什么办法来序列二维阵列Newtonsoft.json
在此先感谢。 SIA
非常感谢国王! 自从过去24小时以来,我一直在努力完成这项工作 – SIA 2010-04-21 11:15:54