Jörn Zaefferer wrote:
>> When I introcuded json.js [http://json.org/json.js] from
>> http://json.org/ . Problem now is my browser keeps freezing and eating
>> up CPU.
>>
>> I checked and it is clearly conflicting with JQuery.
> 
> It extends Object, which seemes to cause lots of trouble with jQuery. You 
> could check if it works when removing Object.prototype.toJSONString.

Yeah, I had this problem, so I hacked the original json.js into a jQuery
plugin. It adds the two functions:

var json_str = $.toJSON(value)
var value    = $.parseJSON(json_str, [safe])

If the optional safe argument is supplied as true, then the string will
be checked for valid JSON syntax.
Safety checks can be set globally by setting:

$.parseJSON.safe = true;


You can find the code here:

http://jollytoad.googlepages.com/json.js

Regards
- Mark Gibson

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to