src/aria/utils/Json.js
function (str, ctxt, errMsg) {
                var JSON = Aria.$global.JSON;
                
                if (ctxt && ctxt.$classpath) {
                    ctxt = ctxt.$classpath;
                }
                
                if (typeof JSON !== "undefined" && typeof JSON.parse === "function") {
                    try {
                        return JSON.parse(str);
                    } catch (ex) {
                        // Fallback to eval
                        this.$logWarn(this.INVALID_JSON_SYNTAX, [ctxt, str]);
                        return this._loadWithEval(str, ctxt, errMsg);
                    }
                }

                return this._loadWithEval(str, ctxt, errMsg);
            }
function (str, ctxt, errMsg) {
                var JSON = Aria.$global.JSON;
                
                if (ctxt && ctxt.$classpath) {
                    ctxt = ctxt.$classpath;
                }
                
                if (typeof JSON !== "undefined" && typeof JSON.parse === "function") {
                    try {
                        return JSON.parse(str);
                    } catch (ex) {
                        // Fallback to eval
                        this.$logWarn(this.INVALID_JSON_SYNTAX, [ctxt, str]);
                        return this._loadWithEval(str, ctxt, errMsg);
                    }
                }

                return this._loadWithEval(str, ctxt, errMsg);
            }
function ( str , ctxt , errMsg ) { var JSON = Aria . $global . JSON ; if ( ctxt && ctxt . $classpath ) { ctxt = ctxt . $classpath ; } if ( typeof JSON !== "undefined" && typeof JSON . parse === "function" ) { try { return JSON . parse ( str ) ; } catch ( ex ) { // Fallback to eval this . $logWarn ( this . INVALID_JSON_SYNTAX , [ ctxt , str ] ) ; return this . _loadWithEval ( str , ctxt , errMsg ) ; } } return this . _loadWithEval ( str , ctxt , errMsg ) ; }
Load a JSON string and return the corresponding object
@param {String} str the JSON string
@param {Object} ctxt caller object - optional - used to retrieve the caller classpath in case of error
@param {String} errMsg the error message to use in case of problem - optional - default:
aria.utils.Json.INVALID_JSON_CONTENT
@return {Object}
Load a JSON string and return the corresponding object