如何在C#Web API中读取嵌套的json数据?

时间:2013-12-18 11:51:18

标签: c# json extjs asp.net-web-api http-post

ExtJS致电:record.save();执行POST api/saveEntry

Firebug显示POST数据已发送:http://pl.vc/26tre

[System.Web.Http.AcceptVerbs("GET", "POST")]
[System.Web.Http.HttpGet]
public Dictionary<string,string> SaveEntry(EntryModel entry=null)

抛出EntryModel类型无法处理的错误(代码500),

public Dictionary<string,string> SaveEntry(string entry=null)

(entry == null)

public Dictionary<string,string> SaveEntry(HttpRequestMessage req=null)

(req==null)

有没有办法获取json数据?

0 个答案:

没有答案