mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 22:33:10 +09:00
테스트용 함수 toJson 제거
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7337 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
a6873272b3
commit
464a918c4d
1 changed files with 0 additions and 22 deletions
|
|
@ -174,28 +174,6 @@ function xml2json(xml, tab, ignoreAttrib) {
|
|||
}
|
||||
}
|
||||
|
||||
function toJson(o, name, ind) {
|
||||
var json = name ? ("\""+name+"\"") : "";
|
||||
if (o instanceof Array) {
|
||||
for (var i=0,n=o.length; i<n; i++)
|
||||
o[i] = toJson(o[i], "", ind+"\t");
|
||||
json += (name?":[":"[") + (o.length > 1 ? ("\n"+ind+"\t"+o.join(",\n"+ind+"\t")+"\n"+ind) : o.join("")) + "]";
|
||||
}
|
||||
else if (o == null)
|
||||
json += (name&&":") + "null";
|
||||
else if (typeof(o) == "object") {
|
||||
var arr = [];
|
||||
for (var m in o)
|
||||
arr[arr.length] = toJson(o[m], m, ind+"\t");
|
||||
json += (name?":{":"{") + (arr.length > 1 ? ("\n"+ind+"\t"+arr.join(",\n"+ind+"\t")+"\n"+ind) : arr.join("")) + "}";
|
||||
}
|
||||
else if (typeof(o) == "string")
|
||||
json += (name&&":") + "\"" + o.toString() + "\"";
|
||||
else
|
||||
json += (name&&":") + o.toString();
|
||||
return json;
|
||||
}
|
||||
|
||||
(function($){
|
||||
/**
|
||||
* @brief exec_xml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue