2009. 9. 29. 11:27
Ajax
출처 : http://code.google.com/p/aspjson/
JSON engine of VBScript based ASP server technology, served on it's deficiency of processing speciality. Also there have been like these projects put they had some deficiencies. For instance
- find result late
- difficult application
- don't support full UNICODE
- don't compatible with primitive datatypes
- don't support to multi dimensional arrays
- isn't extendable and iteratable
This project solved all these matters.
Hello World !
sample
<!--#include file="JSON_latest.asp"-->
<%
Dim member
Set member = jsObject()
member("name") = "Tuğrul"
member("surname") = "Topuz"
member("message") = "Hello World"
member.Flush
%>
output
{"name":"Tu\u011Frul","surname":"Topuz","message":"Hello World"}
SQL Queries
sample
<!--#include file="JSON_latest.asp"-->
<!--#include file="JSON_UTIL_latest.asp"-->
<%
QueryToJSON(dbconn, "SELECT name, surname FROM members WHERE age < 30").Flush
%>
output
[
{
"name":"ali",
"surname":"osman"
},
{
"name":"mahmut",
"surname":"\u00E7\u0131nar"
}
]
Multi Dimensional Arrays
sample
<!--#include file="JSON_latest.asp"-->
<%
Dim a(1,1)
a(0,0) = "zero - zero"
a(0,1) = "zero - one"
a(1,0) = "one - zero"
a(1,1) = "one - one"
Response.Write toJSON(a)
%>
output
[["zero - zero","zero - one"],["one - zero","one - one"]]
For more information you can reach