(This is following up on a question I briefly raised at plenary last week)
With the proposal framed as an options bag on JSON.parse, we're constrained to keeping the same default behavior. If instead we pivot to defining a standard reviver factory for getting revivers to pass to JSON.parse, then we could potentially update the defaults since you're opting into using it by calling the function.
For example,
JSON.parse(str, JSON.frozen())
It's not quite as simple as {}, and is probably a non-starter because preventing communication channels will require returning a brand new function every time, making it infeasible from a performance standpoint, but I figured I'd at least follow up here.
(This is following up on a question I briefly raised at plenary last week)
With the proposal framed as an options bag on
JSON.parse, we're constrained to keeping the same default behavior. If instead we pivot to defining a standard reviver factory for getting revivers to pass toJSON.parse, then we could potentially update the defaults since you're opting into using it by calling the function.For example,
It's not quite as simple as
{}, and is probably a non-starter because preventing communication channels will require returning a brand new function every time, making it infeasible from a performance standpoint, but I figured I'd at least follow up here.