/* Copyright (c) 2004 Jan-Klaas Kollhof This file is part of the JavaScript o lait library(jsolait). jsolait is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this software; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** FOR SUGARCRM This is a stripped down version of lang.php, all it does is: convert JavaScript objects to JSON (see json.org). but *does not* add toJSON() function to every class that is derived from Object */ Module("langlite", "0.3.7", function(mod){ mod.JSONParser=Class("JSONParser", function(publ, supr){ publ.init=function(){ this.libs = {}; } publ.addLib = function(obj, name, exports){ if(exports == null){ this.libs[name] = obj; }else{ for(var i=0;i