views:

48

answers:

4

Hello, How can i preview the JSON output of an MVC Action that uses Jsonresult?

A: 

You could use Firefox + Firebug to view the response

RogerNoble
Thanks...any options for IE?
femi
A: 

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

Hurda
A: 

You could use JSON Viewer in conjuction with Fiddler 2

Nicholas Murray
A: 

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)
    }
Stefanvds