CSSCommonJS.DeepCopy = function (json) {
if (typeof json == 'number' || typeof json == 'string' || typeof json == 'boolean') {
return json;
} else if (typeof json == 'object') {
if (配列の json インスタンス) {
var newArr = [], i, len = json.length;
for (i = 0; i < len; i ) {
newArr[i] = argument.callee(json[i]);
}
return newArr;
} else {
var newObj = {};
for (json の変数名) {
newObj [name] = argument.callee(json[name]);
}
return newObj;
}
}
}