|
|
|
|
|
by delaguardo
210 days ago
|
|
> EDN seems to lack a proper format for binary data The best part of EDN that it is extendable :) #binary/base64 "SGVsbG8sIHp6bzM4Y29tcHV0ZXIhIEhvdyBhcmUgeW91IGRvaW5nPw==" This is a tagged literal that can be read by provided (if provided) custom reader during reading of the document. The result could be any type you want. |
|
Also, if there is not a binary file format for the data then you will need to always convert to/from base64 when working with this file whether or not you should need to.
Furthermore, this does not work very well when you want to deal with character sets rather than binary data, since (as far as I can tell from the specification) the input will still need to be UTF-8 and follow the EDN syntax of an existing type.
From what I can understand from the specification, the EDN decoder will still need to run and cannot be streamed if the official specification is used (which can make it inefficient), although it would probably be possible to make an implementation that can do this with streaming instead (but I don't know if the existing one does).
So, the extensibility is still restricted. (In my opinion, ASN.1 (and ASN.1X) does it better.)