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

Add Support for pyjson5 #9

Open
rejogc opened this issue Jan 26, 2019 · 2 comments
Open

Add Support for pyjson5 #9

rejogc opened this issue Jan 26, 2019 · 2 comments

Comments

@rejogc
Copy link

rejogc commented Jan 26, 2019

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.

@tmetsch
Copy link
Owner

tmetsch commented Jan 27, 2019

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!

@rejogc
Copy link
Author

rejogc commented Jan 27, 2019 via email

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

No branches or pull requests

2 participants