2 ms·
That's where JSON shines, it's a properly "dead" format that can be trivially opted into allowing logic with the old console.log JSON.stringify, without even to
by usrusr 3y ago
That's where JSON shines, it's a properly "dead" format that can be trivially opted into allowing logic with the old console.log JSON.stringify, without even touching the unaffected lines (and all the git history they might be associated with). Certainly more trivially in some environments than in others, but I suppose it's close enough to the sweet spot of "adding logic shouldn't be too easy/shouldn't be too hard" wether the project is already nodeish or not.
The only downside is that if the objects in question happen to be properly documented in typescript, you will never want to go back.
If only there had been a formalized side by side from the start between JSON, the clean serialization format, and the JSON superset for human authoring (comments and quotes anarchy) that people have been informally reinventing hundreds of times...