Skip to content
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

JSON-output #332

Closed
wants to merge 1 commit into from
Closed

JSON-output #332

wants to merge 1 commit into from

Conversation

theaino
Copy link
Contributor

@theaino theaino commented Mar 16, 2024

So apparently this issue for key-value-outputting (#271) exists for some time so I just went and implemented it.
It uses json because it is mostly used in such applications (rather than yaml or similar mentioned in the issue).

The output may look something like this:

$ ./headsetcontrol -jb?
{"device":"Logitech G533","battery":74,"capabilities":["sidetone","battery status","inactive time"]}

The system is made for allowing many changes in the future (other output values can be added in as little as one line).
For now, a success/error message directly in json is probably redundant because that is mostly managed by the return codes.

@Sapd
Copy link
Owner

Sapd commented Mar 17, 2024

Hey,
there is already a full implementation in the feature-output branch - including a full revamp (as discussed in the issue you linked): https://github.com/Sapd/HeadsetControl/tree/feature-output

@Sapd Sapd closed this Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants