简体   繁体   中英

How can I use the standard JSON formatter from an action of my controller in an ASP.NET MVC 5.1 project?

In one of the actions of in my controller I need to serialize an object to JSON I wish I could use the standard JSON formatter that is shipped with ASP.NET MVC 5.1. Is there a way to do that?

So are you having any issues with using return Json(obj,JsonRequestBehavior.AllowGet) ? Here is a good article on returning Json from controller. http://www.codeproject.com/Articles/667841/Learn-MVC-Model-view-controller-Step-by-Step-in

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM