software-challenge / backend

Server, Client und Spiel-Plugins der Software-Challenge Germany
https://www.software-challenge.de
11 stars 10 forks source link

[Question/Wishlist] Using JSON for the protocol instead of XML #408

Open fwcd opened 2 years ago

fwcd commented 2 years ago

This is more of a general question rather than a specific issue. Has using JSON instead of XML for the protocol ever been considered, apart from legacy reasons?

While such a change would have quite a big impact on the way the different clients and the server handle communication, I think there are strong reasons for at least considering such a change e.g. for the next year:

A particular pain point with XML that I've encountered myself is e.g. the lack of good library support for Rust, leaving us essentially with either the option of hand-writing the XML mappings (which is tedious and error-prone) or using pretty limited tools for defining automatic mappings between structs and XML, which still require careful manual review of certain edge cases.

While these problems might not apply (as much) to other languages, JSON would solve pretty much all of these issues and at the same time simplify the protocol in general.

xeruf commented 2 years ago

Yeah, sometimes I have been unhappy with XML, too - but it is pretty stable now and every major language should support it. I am pretty surprised there is no parser for Rust yet.

We have quite a few big construction zones that concern the user-friendliness and maintainability of the project, so if this is ever considered, not in the near-term, sorry.