Re:Add extra stuff to a “standard” encoding? Sure, why not
by catiopatio on Wednesday September 20, 2023 @12:31PM
(#37586276)
<?xml version="1.1" encoding="UTF-8" ?>
The others are serialization formats, like protobuf — they’re not file formats.
Re:Add extra stuff to a “standard” encoding? Sure, why not
by paulddraper on Wednesday September 20, 2023 @02:16PM
(#37587759)
XML prolog is optional.
> they're not file formats
Brb, gonna delete all my files without file formats
Re:Add extra stuff to a “standard” encoding? Sure, why not
by catiopatio on Wednesday September 20, 2023 @07:56PM
(#37591622)
If you prefer to ship fragile binary file formats for no reason other than finding it too onerous to define something as trivial as an eight-byte file header, that’s silly, but nobody is going to stop you.
If you’re going to use text-based serialization formats as your justification for the decision, however, I’d suggest you look into all the fun bugs, security issues, and weird edges cases that arise from parsers having to make a best guess at character encoding and file format when all you have to work with is the file extension, maybe a byte order mark, and heuristics over the file contents.
XML
JSON
YML
TOML