4 ms·
Why no XML as response type?
by shafqat 17y ago
Why no XML as response type?
- sant0sk1 17y agoOne reason: JSON is more terse which reduces payload size.
- mechanical_fish 17y agoBig response payload. Annoying to parse -- slow, or requires fiddly libraries with lots of features you aren't gonna use anyway, or both. Difficult to read. Also: Overkill. One of my favorite lines was uttered by Philip Greenspun in 2000, back when XML was such a mindless fad that some companies were actually marketing themselves as "XML companies": "how come nobody ever talks about being a comma-separated-values company?" It was a good question then, and now that JSON and YAML are widely known and supported it is an even better question.
- n8agrin 17y agoI could not agree more. I work daily with xml encoded apis and it's never a simple task to parse and normalize data. JSON on the other hand gives you normalized types out of the box. Very handy.