src/aria/utils/Json.js
function (str, ctxt, errMsg) {
                var res = null;

                try {
                    str = ('' + str).replace(/^\s/, ''); // remove first spaces
                    res = Aria["eval"]('return (' + str + ');');
                } catch (ex) {
                    if (!errMsg) {
                        errMsg = this.INVALID_JSON_CONTENT;
                    }
                    this.$logError(errMsg, [ctxt, str], ex);
                }

                return res;
            }
function (str, ctxt, errMsg) {
                var res = null;

                try {
                    str = ('' + str).replace(/^\s/, ''); // remove first spaces
                    res = Aria["eval"]('return (' + str + ');');
                } catch (ex) {
                    if (!errMsg) {
                        errMsg = this.INVALID_JSON_CONTENT;
                    }
                    this.$logError(errMsg, [ctxt, str], ex);
                }

                return res;
            }
function ( str , ctxt , errMsg ) { var res = null ; try { str = ( '' + str ) . replace ( / ^\s / , '' ) ; // remove first spaces res = Aria [ "eval" ] ( 'return (' + str + ');' ) ; } catch ( ex ) { if ( ! errMsg ) { errMsg = this . INVALID_JSON_CONTENT ; } this . $logError ( errMsg , [ ctxt , str ] , ex ) ; } return res ; }
Load a JSON string and return the corresponding object using eval
@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}
@private
Load a JSON string and return the corresponding object using eval