<% 'simple number output = (new JSON)("myNum", 2, false) 'generates {"myNum": 2} 'array with different datatypes output = (new JSON)("anArray", array(2, "x", null), true) 'generates "anArray": [2, "x", null] '(note: the last parameter was true, thus no surrounding brackets in the result) %>
set j = new JSON j.toJSON "n", array(RS, dict, false), false j.toJSON "n", array(array(), 2, true), false
"name": {"key1": "some value", "key2": "other value"}
function reflect() set reflect = server.createObject("scripting.dictionary") reflect.add "firstname", firstname reflect.add "lastname", lastname end function
<script>alert(<%= (new JSON)(empty, request, false) %>.servervariables.HTTP_HOST);</script>