我有一个复杂的 json 结构。在这里它被简化了,因为它也会发生这种情况:
{
"Id":0,
"Name":"Region Challenge",
"ModifiedOn":"2011-09-08T17:49:22",
"State":"Published",
"Goals":[
{"Id":1,"Description":"some text here","DisplayOrder":1},
{"Id":2,"Description":"some text here","DisplayOrder":2}
]
}
因此,当将此数据发布到控制器时,我可以毫无问题地获取 Id、Name 等的这些值。但是,当我查看本地窗口时,Goals 为空。
签名是:
public JsonResult Save(int Id, String Name, DateTime ModifiedOn, String State, String Goals)
POST 标头是:
User-Agent: Fiddler
Host: localhost:2515
Content-Type: application/json
Content-Length: 7336
我如何读入数据以便可以迭代它?
谢谢!埃里克