3 ms·
>EDIT: Oh, and instead of CDATA, we now simply base64 encode arbitrary objects and pack them into JSON encoded strings. Is this really an improvement? I think
by unlinked_dll 7y ago
>EDIT: Oh, and instead of CDATA, we now simply base64 encode arbitrary objects and pack them into JSON encoded strings. Is this really an improvement?
I think that's more of an indictment of HTTP than XML or JSON. Maybe we should have a better standard for exchanging non-textual data with websites.
- dfox 7y agoCDATA still does not allow you to include even arbitrary sequences of unicode codepoints, not to mention arbitrary binary data. On the other hand HTTP is in fact a binary protocol and there is perfectly good way to transport sets of binary objects with associated metadata: MIME multipart/whatever. With multipart/byteranges even being part of HTTP itself and multipart/form-data being one of the "core web technologies".
- delfinom 7y agoNo it's not. It's because people like to just pipe it into same request framework, get a json object and then later do base64_decode(json["binaryobject"]) instead of a separate http request to do binary transport which it can already do.