/ Published in: JavaScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
if(typeof window.JSON=='undefined') { window.JSON = { parseJSobject : function (object) { var temp = '{'; var s = 0; for(i in object) { if(s) { temp+=','; } temp += '"'+i+'":'; if(typeof object[i] == 'object') { temp += this.parseJSobject(object[i]); } else { temp += '"'+object[i]+'"'; } s++; } temp += '}'; return temp; }, stringify : function(data){ return this.parseJSobject(data); } }; }
Comments
