Javascript examples for JSon:JSon Object
Display and prettify returned JSON objects
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> body { white-space: pre; font-family: monospace; } </style> <script type="text/javascript"> window.onload=function(){/* w w w. j av a 2 s .c om*/ var obj = {"hello":"world", "Test":["hello"]} document.body.innerHTML = ""; document.body.appendChild(document.createTextNode(JSON.stringify(obj, null, 4))); } </script> </head> <body> </body> </html>