//**********************************************************// //Netmining Generated JS File //**********************************************************// /** * string.js * * Contains all generic String related functions */ /** * Encodes an object according the json standard * An equivalent exists in php 5.2.0 and later * * An object can be serialized in javascript to be * deserialized in php using this function * * @param expr The expression to serialize. Can be * any javascript type. * @return The json string representation of the object */ function json_encode(expr) { var str = ""; // the json string representation of the variable switch(typeof(expr)) { case "object": if(expr==null) { str = "null"; } else if(expr.constructor==Date) { str = "\"" + expr.getFullYear() + "-" + String(exp.getMonth()+100).substr(1) + "-" + String(exp.getDate()+100).substr(1) + "T" + exp.toTimeString().substr(0,8) + "\""; } else if(expr.constructor==Array) { var tmp = []; for(var i=0; i