3 ms·
Content negotiation is a great way to expose multiple serialization formats. No reason it has to be just one of the well known formats. The main tricky part is
by strmpnk 13y ago
Content negotiation is a great way to expose multiple serialization formats. No reason it has to be just one of the well known formats. The main tricky part is equivalence of more complex structures in JSON, for example msgpack supports more than just string keys in maps.
- hapless 13y agoSo now I get to support more than one format, with corresponding increases in complexity... ..But only the JSON format will have any users, and I still have to deal with anything I find objectionable about JSON.
- strmpnk 13y agoIn most systems I've deployed multi-format support it was a matter of a few extra lines of code rather than a doubling of effort. Pretty much all JSON values have obvious (aka. automatic) equivalents in other formats. JSON is truly the lowest common denominator, which is its strength.