-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add Support for pyjson5 #9
Comments
Hi, thanks for that suggestion - I will look into json5. The commenting feature would be nice to have feature, for sure. Maybe we could try to import pyjson5, and if not available fallback to the default json module. I'll do some test and see if I can find an elegant solution. If you have one, feel free to create a PR. Thanks! |
Try/except on the import is probably the cleanest way to go.
BTW, thanks for pytkgen. Very simple and concise gui tool
…On Sun, Jan 27, 2019, 6:57 AM tmetsch ***@***.*** wrote:
Hi,
thanks for that suggestion - I will look into json5. The commenting
feature would be nice to have feature, for sure.
Maybe we could try to import pyjson5, and if not available fallback to the
default json module. I'll do some test and see if I can find an elegant
solution. If you have one, feel free to create a PR.
Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFYglDOPwrpBAbd9y5eRL3AjgvMBlFBxks5vHb5mgaJpZM4aUc6n>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using pyjson5 instead of the standard json would greatly enhance the usefulness of this tool. It would also be only a 1 line change to the source code from 'import json' to 'import pyjson5 as json'. pyjson5 is a backwards compatible implementation of json following the proposed json5 standard and it's available in PyPI. json5 offers a lot of readability features that would make the json input into pytkgen.gengui look a lot more like a standard python dictionary. Also, json5 allows for single and double line comments. That would make pytkgen much more usable because one could then add comments to their gui code or comment out parts that don't work.
The text was updated successfully, but these errors were encountered: