-
Notifications
You must be signed in to change notification settings - Fork 15.5k
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
decode to json from command line #4024
Comments
note: I observed this on 3.5.0 |
Any update on this feature, is it available now? I couldn't find any option in
Command: Output: output is not json
|
Since this has been part of the API for a long time, but was never added to the |
@hq6 Thank you very much. It works |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment. This issue is labeled |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it. This issue was closed and archived because there has been no new activity in the 14 days since the |
Bug: The man page does not state what format is used by the --decode and --encode options
Feature request: Add an option to decode directly to json.
Looking for a way to decode a message into json from the command line I stumbled upon:
https://stackoverflow.com/questions/34952811/is-there-a-definitive-nix-command-line-tool-for-inspecting-protocol-buffers
which mentions the --decode option which at first sight appears to be just what I was looking for.
However the output format is not in fact json but something called "text format" which is undocumented (see #3755).
My use case is that I am writing test cases to check the output of programs that send messages encoded using protocol buffers. I want to convert them to some format that can be analysed easily and add test assertions.
E.g.
The text was updated successfully, but these errors were encountered: