I've a JSON string needing decoded - say for example

Code:
this.b=100;
var json='{a: this.b}';
var obj=Ext.decode(json);
console.log(obj.a); // undefined
The usual Ext.decode() function doesn't inherit the scope of the caller and doesn't allow passing a variable which allows the scope to be specified when decoding the JSON string - eg Ext.decode(json, this);

I've been able to use the javascript call method to execute the Ext.decode() within the scope of this as follows:

Code:
this.b=100;
var json='{a: this.b}';
var obj=Ext.decode.call(this,json);
console.log(obj.a); // works
I've had a look at the underlying code of Ext.decode() If the native JSON.parse is available it uses that, otherwise it uses eval() to do the parsing. In my case (Firefox 3.0.10 eval is used)

Does anyone know what scope JSON.parse uses by default if native support exists for it? Would a call method be needed to specify a particular scope?

Also, would it be an idea to modify the implementation of Ext.decode() to allow the passing of scope?