/* Copyright (c) 2004-2006, The Dojo Foundation All Rights Reserved. Licensed under the Academic Free License version 2.1 or above OR the modified BSD license. For more information on Dojo licensing, see: http://dojotoolkit.org/community/licensing.shtml */ dojo.provide("dojo.json"); dojo.require("dojo.lang.func"); dojo.require("dojo.string.extras"); dojo.require("dojo.AdapterRegistry"); dojo.json={jsonRegistry:new dojo.AdapterRegistry(),register:function(_1,_2,_3,_4){ dojo.json.jsonRegistry.register(_1,_2,_3,_4); },evalJson:function(_5){ try{ return eval("("+_5+")"); } catch(e){ dojo.debug(e); return _5; } },serialize:function(o){ var _7=typeof (o); if(_7=="undefined"){ return "undefined"; }else{ if((_7=="number")||(_7=="boolean")){ return o+""; }else{ if(o===null){ return "null"; } } } if(_7=="string"){ return dojo.string.escapeString(o); } var me=arguments.callee; var _9; if(typeof (o.__json__)=="function"){ _9=o.__json__(); if(o!==_9){ return me(_9); } } if(typeof (o.json)=="function"){ _9=o.json(); if(o!==_9){ return me(_9); } } if(_7!="function"&&typeof (o.length)=="number"){ var _a=[]; for(var i=0;i