Convert query string to JSON : JSON « Dojo toolkit « JavaScript DHTML






Convert query string to JSON

 

<html>
  <head>
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/"
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script language="JavaScript" type="text/javascript">
      var s = dojo.objectToQuery({
        c1 : "A",
        c2 : "B",
        c3 : "C"
      });
      alert(dojo.toJson(dojo.queryToObject(s)));
    </script>
  </head>
  <body></body>
</html>

   
  








Dojo-toolkit.zip( 3,849 k)

Related examples in the same category

1.Convert array to JSON
2.Convert object to JSON