2 ms·
> Definitely not protocol buffers. You know Protocol Buffers has a text format, right? > I wouldn't use an ad-hoc parser for JSON either. The problem here isn
by haberman 12y ago
> Definitely not protocol buffers.
You know Protocol Buffers has a text format, right?
> I wouldn't use an ad-hoc parser for JSON either. The problem here isn't XML, the problem is thinking that you can solve your problem with regular expressions.
You are drawing a false equivalence. No matter how you slice it, JSON is far, far simpler to (correctly) parse than XML.
> Escape sequences in XML are better than JSON, at least.
The best case you have for this is that you need to encode high-Unicode characters over a non-8-bit-clean channel? This a very fringe use case. And your argument is that "𐹭" is way better than \uD803\uDE6D? Neither of those look particularly user-friendly to me.
> 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.
The point is not that JSON is best for everything, the point is that XML is best for almost nothing.