3 ms·
Json encoded as a string is cursed, no one should do that and stop suggesting it. Base64 is fine or even ascii85
by 38 2y ago
Json encoded as a string is cursed, no one should do that and stop suggesting it. Base64 is fine or even ascii85
- Groxx 2y agobase64 is often even larger than an escaped JSON string. and not human-readable at all. I'll take stringified json-in-json 90% of the time, thanks. if you're using JSON you're already choosing an inefficient, human-oriented language anyway, a small bit more overhead doesn't hurt. (obviously neither of these are good options, just defer your parsing so you retain the exact byte sequences while checking, and then parse the substring. you shouldn't be parsing before checking anyway. but when you can't trust people to do that...)
- deleted 2y ago[deleted]
- benatkin 2y agoThe comment you replied to was posted in good faith AFAICT. Your “stop suggesting it” is unnecessarily antagonistic.