Popular JavaScript recipes tagged "json"http://code.activestate.com/recipes/langs/javascript/tags/json/2011-01-18T22:59:12-08:00ActiveState Code Recipesnicerest: pretty-print JSON output (JavaScript)
2011-01-18T22:59:12-08:00Trent Mickhttp://code.activestate.com/recipes/users/4173505/http://code.activestate.com/recipes/577549-nicerest-pretty-print-json-output/
<p style="color: grey">
JavaScript
recipe 577549
by <a href="/recipes/users/4173505/">Trent Mick</a>
(<a href="/recipes/tags/curl/">curl</a>, <a href="/recipes/tags/json/">json</a>, <a href="/recipes/tags/node/">node</a>, <a href="/recipes/tags/nodejs/">nodejs</a>, <a href="/recipes/tags/rest/">rest</a>).
Revision 3.
</p>
<p>Save this to "nicerest", <code>chmod +x</code>-it, and pipe your REST API <code>curl</code> calls through this for nicer output. It will notice HTTP headers (curl's <code>-i</code> option) and skips those before attempting to pretty-print the following JSON.</p>
<p>Note: This is currently using node 0.2. I should update for 0.3 changes (I think <code>process.openStdin</code> changed).</p>
Javascript - JSON Parser (only for study) (JavaScript)
2010-07-27T19:36:50-07:00Danillo Souzahttp://code.activestate.com/recipes/users/4174445/http://code.activestate.com/recipes/577337-javascript-json-parser-only-for-study/
<p style="color: grey">
JavaScript
recipe 577337
by <a href="/recipes/users/4174445/">Danillo Souza</a>
(<a href="/recipes/tags/json/">json</a>, <a href="/recipes/tags/parse/">parse</a>).
</p>
<p>JSON parser for any object in the script.</p>
<p>OBS: Need a way to identify methods.</p>