3 ms·
The key part here is > As long as the JSON string is only evaluated once the JSON.parse approach is much faster. So doing this would only work on top-level de
by alufers 7y ago
The key part here is
> As long as the JSON string is only evaluated once the JSON.parse approach is much faster.
So doing this would only work on top-level declarations, because the javascript runtime will cache the parsed JSON structure for subsequent executions (eg. creating an object in a loop).