开发者

json output of an MVC Action

开发者 https://www.devze.com 2023-01-12 13:52 出处:网络
How can i preview the JSON output of an M开发者_开发知识库VC Action that uses Jsonresult?You could use JSON Viewer in conjuction with Fiddler 2You could use Firefox + Firebug to view the responseI wou

How can i preview the JSON output of an M开发者_开发知识库VC Action that uses Jsonresult?


You could use JSON Viewer in conjuction with Fiddler 2


You could use Firefox + Firebug to view the response


I would go for the firefox Firebug plugin,

Or you can use some "proxiing" tool like TCPMon https://tcpmon.dev.java.net/ (java) or one is provided with MS SOAP toolkit http://www.microsoft.com/downloads/details.aspx?FamilyId=C943C0DD-CEEC-4088-9753-86F052EC8450&displaylang=en


i use this small piece of code to dump the json object

    function dump(obj) {
        var out = '';
        for (var i in obj) {
            out += i + ": " + obj[i] + "\n";
        }

        alert(out);

        // or, if you wanted to avoid alerts...

        var pre = document.createElement('pre');
        pre.innerHTML = out;
        document.body.appendChild(pre)
    }


This may be helpful.

MVC.ApiExplorer is a portable, independent component that can help you to explore all actions of controller in an ASP.NET MVC project.

0

精彩评论

暂无评论...
验证码 换一张
取 消