4 ms·
I don’t think a server should serve the same content in xml and json. 1. Why cater to this preference - you must ultimately force the consumer to do certain th
by sagebird 7y ago
I don’t think a server should serve the same content in xml and json.
1. Why cater to this preference - you must ultimately force the consumer to do certain things to consume your data. Where do you stop? If some prefer the data in excel97 should you cater to that as well?
2. Do you want to have the liability of the possibility of the format’s data not being fully synchronized? Serve it one way and it will not happen.
- Finnucane 7y agoVirtually every editor, programming language, database system, etc., can deal with json and/or xml. So it's not much of a constraint. And there's nothing stopping you from providing additional streams if they're desired for any reason.
- treve 7y agoMost of our REST endpoints can generate HTML, JSON and some of them text/csv. It's been working really well for us since 2016.
- deleted 7y ago[deleted]
- codeflo 7y agoI’ve had this discussion as well, and I fully agree. In my experience, this kind of thing exists purely to sneak in the more programmer friendly JSON in corporate environments that have otherwise “standardized on XML”. You wouldn’t get away with pure JSON, but you can argue for a hybrid approach.
- reacweb 7y agoyes. and the version 1 just provides json. After a while, the client accept to forget about xml (in favour of other functionalities) and the case is closed.
- deleted 7y ago[deleted]