Linked Questions

64 votes
8 answers
148k views

Possible Duplicate: JavaScript data formatting/pretty printer I am getting a bit tired of looking at unformatted json blobs in FireBug. Does anyone know an equivalent to PHP's print_r() for ...
Eli's user avatar
  • 100k
2 votes
1 answer
6k views

Possible Duplicate: JavaScript data formatting/pretty printer var theobject_string = '{...}'; // I have a json object as a string. How can I display this string in a pretty way, on my webpage (...
TIMEX's user avatar
  • 275k
1 vote
0 answers
44 views

Possible Duplicate: JavaScript data formatting/pretty printer Would like to to translate a javascript object into a string so that I can display in the browser window. So an object that looks ...
Chris Dutrow's user avatar
  • 50.7k
3550 votes
32 answers
2.0m views

How can I display JSON in an easy-to-read (for human readers) format? I'm looking primarily for indentation and whitespace, with perhaps even colors / font-styles / etc.
Mark's user avatar
  • 70.4k
86 votes
4 answers
89k views

I'm using Node.js to POST JSON to PostBin but the data is being wrongly formated (as you can see here: http://www.postbin.org/1cpndqw). This is the code I'm using for tesT: var http = require('http')...
donald's user avatar
  • 23.8k
37 votes
7 answers
15k views

The following code illustrates an object literal being assigned, but with no semicolon afterwards: var literal = { say: function(msg) { alert(msg); } } literal.say("hello world!"); This appears ...
Mike Stone's user avatar
  • 44.7k
26 votes
7 answers
72k views

I have a javascript object, and I want to recursively search it to find any properties that contain a specific value. The javascript I'm working with has been minified, and is not so easy to trace ...
Alan's user avatar
  • 47k
16 votes
7 answers
30k views

Seems to me that pretty-printing JSON is a simple enough task that JavaScript should be able to handle it. Has anyone ever written (or run across) a JavaScript function to do this?
Hot Licks's user avatar
  • 47.8k
9 votes
8 answers
2k views

I have been using Java for a long time, and for quite some time I was doing web development using GWT (Google Web Toolkit). The beauty of it was that I had my Java object oriented constructs and would ...
oneiros's user avatar
  • 3,588
9 votes
4 answers
481 views

I'm aware of console.log in firebug, and this thing called dbug (but not at all what I want). What I'm looking for is something that will give me a pretty print nested view into an object that looks ...
cgp's user avatar
  • 41.4k