3 ms·
Interesting, I’ve never seen this, thanks! The problem I see with this is that whatever you’re sending this to must have knowledge of the meta information supe
by shrew 3y ago
Interesting, I’ve never seen this, thanks!
The problem I see with this is that whatever you’re sending this to must have knowledge of the meta information superjson produces, so at that point you’re investing in it as a wrapper library. The fact you can extend the types it serialises also complicates things and means the receiver needs further implementation specific knowledge.
I think in my original comment, I was imagining a world where JSON.serialize threw errors on unknown types and we needed a wrapper just get basic JSON out of it.