title: Using json2.js inside classic ASP
body: <p>Good day,</p>
  
  <p>I am confused as to when I am using VBScript, Javascript, and JScript inside classic ASP.
  I've been told that our environment uses JScript by default.<br>
  So when we create a blank page with our company's standard includes, we just start coding in JScript.</p>
  
  <p>Now I wish to use the json2.js file so that I can parse incoming JSON and send JSON out to clients/browsers.</p>
  
  <p>I didn't think that I needed to do anything special to use json2.js since it's pure javascript. But I'm having issues placing the SCRIPT tag.  Basically when and where do I need a new SCRIPT tag inside a classic ASP page?  </p>
  
  <p>I am getting a 'JSON' is null or not an object' response.  That leads me to believe that the JSON.parse() method is not even being recognized.</p>
  
  <p>Thanks</p>
  
  <pre><code>&lt;script language="javascript" runat="server" src="json2.js"&gt;&lt;/script&gt;
  
     &lt;%
           .... ..... some ASP Code in JScript
  
      %&gt;
      &lt;script language="javascript" runat="server"&gt;
  
          var lngBytesCount
              lngBytesCount = Request.TotalBytes
  
          var requestBody = BytesToStr(Request.BinaryRead(lngBytesCount));
          //var jsonObject=JSON.parse(\"{"answer":"ok"}\");   
  
          var jsonObject=JSON.parse(requestBody); 
  
          Response.ContentType = "application/json";
  
          for (var i in jsonObject){
              Response.Write(jsonObject[i]);
          }
  
          //var json = eval(requestBody);
          //Response.Write(json);
          Response.End()
  
      &lt;/script&gt;
  
      &lt;%
       .... ..... some ASP Code in JScript
  </code></pre>