function Cast (obj, class_constructor) {
try {
if (eval(class_constructor + '["_isfieldmapper"]')) {
- debug("Casting object to class " + class_constructor + "\n");
obj = eval("new " + class_constructor + "(obj)");
- debug("My Classname: " + obj.classname);
}
} catch( E ) {
alert( E + "\n");
json = String(json).replace( /\/\*--\s*S\w*?\s*?\s+\w+\s*--\*\//g, 'Cast(');
json = String(json).replace( /\/\*--\s*E\w*?\s*?\s+(\w+)\s*--\*\//g, ', "$1")');
- debug("=======================\n" + json);
-
var obj;
if (json != '') {
try {
function js2JSON(arg) {
var i, o, u, v;
- debug( "Running js2JSON on " + arg );
-
switch (typeof arg) {
case 'object':