Functions for encoding strings, dates, arrays and dictionaries for JSON in Classic ASP. String encoding uses fast JavaScript regular expression search/replace.
See test/index.asp for examples of usage.
Encode a string for embedding as a value in a JSON document
t = JSONEncodeString(s)
Format a date object into ISO-8601 so that JavaScript will parse it
d = JSONEncodeDate(Now)
Convert a dictionary object into a JSON object literal, with a parent element
json = JSONEncodeDict("response", dict)
Convert an array into a JSON array literal
json = JSONEncodeArray(arr)