4 ms·
Like it says earlier in the post, it could be enough to only serialize (stringify) the data structure at the very end of building it, once it's finalized. Once
by DCoder 10y ago
Like it says earlier in the post, it could be enough to only serialize (stringify) the data structure at the very end of building it, once it's finalized. Once it's stringified, it must be treated as a isolated black box, which cannot be inspected, modified, or combined with other black boxes.
I tried to build something like that for rendering HTML, for the same reasons – security and proper structure. But, stupidly, I was working in PHP, and so its syntax was somewhat clunky. I still think it is a good idea, though.