Regarding this line:
var data = encodeURIComponent(JSON.stringify(object_literal));
I don't understand why this is being URI encoded.
Later data will be sent via ajax POST
.
I understand that URLs, particularly the one you can see in the browser address bar require special characters as described here:
http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
But what exactly does this have to do with Ajax posting?
Do both the url address bar and the internal ajax post utilize the same mechanism?