asp.net mvc post json receiving data transmitted by the dynamic and easy access into a sequence of code

[HttpPost]
public ActionResult Login()
{
    var form = JsonConvert.DeserializeObject<dynamic>(new StreamReader(Request.InputStream).ReadToEnd());
    string username = form.username;
    string password = form.password;
    ....
}

Guess you like

Origin www.cnblogs.com/tolingsoft/p/11768594.html