3 ms·
> Definitely not protocol buffers. I fail to see why protocol buffers couldn't have worked for SVG. They are expressly defined so that you can have extensible
by cbsmith 12y ago
> Definitely not protocol buffers.
I fail to see why protocol buffers couldn't have worked for SVG. They are expressly defined so that you can have extensible types without breaking parsers...
> I wouldn't use an ad-hoc parser for JSON either. The problem here isn't XML
...but you can find plenty of "parsers" for both that don't actually parse either fully, correctly, or securely.
> Try escaping a character from the astral plane in JSON, you have to encode it in UTF-16 and then encode each item in the surrogate pair as a separate escape sequence.
One of many reasons to be annoyed by those who think JSON is a perfectly good data format.
> Escape sequences are a natural part of any text format, other than plain text.
Another reason to loathe them. ;-)
That said, you can avoid escape sequences in text formats, so long as your parse rules are length delimited, rather than based on reserved characters.
> Most of the modern XML stack is a mistake, a symptom of the years when people thought XML was the coolest thing ever. XSLT is the worst mistake of all. That doesn't mean that you have to use it. Most people don't.
Agreed, but generally if you aren't supporting it, you aren't using XML.
> Let's not fall into the trap of thinking that we should use JSON for everything, just like so many fell into the trap of thinking that they should use XML for everything. Both have their use cases.
Yes, though I'd argue they are primarily for causing problems.