-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix option --[no-]json-translate #337
Conversation
Finally I went with a more complete solution were |
These prefixes are from Getopt::Long, see https://metacpan.org/pod/Getopt::Long#!
The default value of the `raw` property is removed and the `raw` property value is set later. Nice suggestion from @mattias-p.
Here are the different possibilities for the assignment of the "raw" property: ∅ means that the option is not passed and the property undefined 0 means that the option is passed in its negated form (property = 0) 1 means that the option is passed in its positive form (property = 1) +---------------+ | raw | | ------------- | | ∅ 0 1 | +-----------------------+---------------+ | | ∅ | 0 0 1 | | json_translate | 0 | 1 0 1 | | | 1 | 0 0 1 | +-----------------------+---------------+ assigned value to the "raw" property
I've refactored the PR. There was a small glitch with your suggestion @mattias-p. If there is no option passed, the output should be translated ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works as expected.
Purpose
This PR fixes 2 small error/bugs discovered during v2023.1 release testing.
Context
#308 #309
v2023.1 release testing comment #308 (comment)
v2023.1 release testing comment #309 (comment)
Changes
--no-json-translate
option--[no-]json_translate
How to test this PR
--[no-]json_translate
option gives a deprecation warning.--no-json-translate
does not output themessage
key.