<script type = "text/javaScript">/*** output objek JS apa pun sebagai format JSON string* @param {objek} _obj: Objek yang perlu output sebagai string*/var obj2string = function (_obj) {var t = typeof (_obj); if (t! = 'objek' || _obj === null) {// Jenis data sederhana if (t == 'string') {_obj = '"' + _obj + '"'; } return string (_obj); } else {if (_obj instance dari tanggal) {return _obj.tolocalestring (); } // Mengatur array atau objek var n, v, json = [], arr = (_obj && _obj.constructor == array); untuk (n di _obj) {v = _obj [n]; t = typeof (v); if (t == 'string') {v = '"' + v + '"'; } else if (t == "objek" && v! == null) {v = this.obj2string (v); } json.push ((arr? '': '"' + n + '":') + string (v)); } return (arr? '[': '{') + string (json) + (arr? ']': '}'); }}; var obj = {"result": {"fs": {"tsp.ibr.mirror": [{"_value": "1.0", "_class": 4}], "tsp.ibr.get_fnames": [{"_value": "0.0", "{{{{{{{{{{{{" _ [{"_value": "0.0", "_class": 4}], "tsp.ibr.info": [{"_value": "0.0", "_class": 4}]}}, "aoKeled": false, "e": "", "ISPONSED:" 0, "A," 0, "AP:" A, ":" ",": "A,": "A,": "A,": "A,": "A,": "A,": "A,": "A," A, "0," A, ":" "", "a," a, "a," a, "a," a, "a. false, "kode": 0, "requid": "xxxx-xxxxxxx-xxxxx-6c2f17bb-ea18-42ec-98fa-3f63b8d26aba-rq" funcan _ ":" 1.0 "," fname ":" tsp.ibr.ibr.get "," "" 1, "FIGNOME", "FUNNOME", "FUNNEM", "1," 1, "1," 1, "1," 1, "1," 1, "1," 1, "FUNIONS" LIGAS "," 1, "1," 1, "1," FUNIONS "LIGMEON" "" "dir": "down", "nodetime": 1362462128706, "iskeycompressed": false, "seq": 2} peringatan (obj2string (obj)) </skrip>