In ASP.NET MVC, deserialize JSON prior to or in controller's action method

后端 未结 5 773
深忆病人
深忆病人 2020-12-25 13:27

I am working on a website that will post a JSON object (using jQuery Post method) to the server side.

{ 
    \"ID\" : 1,
    \"FullName\" : {
       \"First         


        
5条回答
  •  無奈伤痛
    2020-12-25 14:23

    You could try Json.NET. The documentation is pretty good and it should be able to do what you need. You'll also want to grab JsonNetResult as it returns an ActionResult that can be used in ASP.NET MVC application. It's quite easy to use.

    Json.NET also works well with Date serialization. More info regarding that can be found here.

    Hope this helps.

提交回复
热议问题