Classic ASP server-side JSON library Classic ASP server-side JSON library json json

Classic ASP server-side JSON library


In my experience, JSON2.js works in Classic ASP.

To use it, I do this in the .asp code:

<%@ language="Javascript" %><script language="javascript" runat="server" src='json2.js'></script><script language="javascript" runat="server">   ... my code here....   // use the JSON object:   var jsonRepresentation = JSON.stringify(myObject, null, 2);</script>


For writing/outputting JSON i believe the aspjson project is a pretty good choice. Parsing JSON in ASP "classic" is discussed here:

In that thread, Chris Nielsen has a creative idea of using a Javascript library on the server side (as ASP supports JScript as well as VBScript). I have not tried it, but maybe that could solve both parsing and writing.