-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert messages to serialized JSON format [BREAKING CHANGE] #39
base: master
Are you sure you want to change the base?
Conversation
Require incoming messages to be serialized JSON strings. This is part 1 of a 2-part change to convert to JSON messaging.
All commands now respond with a message consisting of a JSON string
Also adds 4 previously-undocumented commands to list
See LiveSplit/LiveSplit.Server#39 for more details
I could use some help testing all of the |
In my opinion this breaking change must be changed. Server could work with string commands as always, but if we need to switch to JSON messaging we could do it via Algorithm example
Why?
updated |
Respectfully, that sounds like an unnecessary complication. Existing clients that don't want to deal with the breaking change could simply keep the older version. Using a standardized communication protocol like JSON as the default opens up many more options for advanced communication between the client and server, many of which the text-based protocol would not be able to implement (or at least not cleanly). For example, a feature idea I had for the future would be to have a Optional parameters (like nonces) are also notoriously difficult to do with just a space-delimited string. There's nothing wrong with a breaking change as long as the messaging is clear. If the version number is properly updated and the changelog properly warns about the change, existing clients can be prepared and either make the changes or simply not update (losing no functionality anyways). |
Not sure if it's something we want, but we also have the option of changing the URL of the XML with the list of updates, which would allow us to disable automatic updates from the current version to the version with the breaking changes. |
I'd defer to your judgment for release specifics. I think either way the semver must be updated to the next major number (so 2.0, in this case) to indicate a breaking change. |
Sorry for the delay on this PR. I am comfortable with merging this once this is fully tested, but I haven't had the time to do that myself. If you're confident that this all works correctly, let me know and I can merge. |
Any updates? |
Is this still active? I have something that uses the current implementation of the server and just want to be prepared if/when this gets merged. Switching to JSON requests/responses does seem like a good idea. Looking at it there are a couple of things I'd ask for:
|
Additionally, all commands now respond with a message indicating their success or failure