-
Notifications
You must be signed in to change notification settings - Fork 68
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
Optional plain JSON result #197
Comments
Sorry for the late reply @hingehe. Can you tell me a bit more about your programming tool? Is it a TTY or not? Anything else I could look for to strip color and formatting? |
Hi again @hingehe, sorry for the delayed response. The output crate I use is That being said, can you try defining |
Summary
I've had a hard time to read the output of jwt in my programming tool in spite of the -j option, because in error-case it doesn't return plain json as expected:
�[0m�[1m�[31mThe JWT provided is invalid because Error(Base64(InvalidByte(85, 61)))
{
"header": {
"typ": "JWT",
"alg": "ES256",
[...]
Especially the weird color-information in the error should be deactivatable by a new option (like --plaintext oslt).
Steps to reproduce
Run jwt -j with an expired token for instance
Expected behavior
Return plain JSON wrapping the current one with something like that without color codes:
{
"result: {
"error": "The JWT provided is invalid because Error(Base64(InvalidByte(85, 61)))"
}
"header": {
"typ": "JWT",
"alg": "ES256",
[...]
The text was updated successfully, but these errors were encountered: