Convert array to JSON : JSON « Dojo toolkit « JavaScript Tutorial






<html>
  <head>
    <link rel="StyleSheet" type="text/css"
      href="js/dojo/dijit/themes/tundra/tundra.css">
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/",
        parseOnLoad : true
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script>
    function Foo(  ) {
        var o = {a:1, b:2, c:3, d:4};
        alert( dojo.toJson(o, true));

    }


    </script>
  </head>
  <body class="tundra" onload=Foo()>


</body>
</html>








29.92.JSON
29.92.1.Convert array to JSON
29.92.2.Convert object to JSON
29.92.3.Convert query string to JSON