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 option to have OrderedDict hooked on load(s) #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

robcxyz
Copy link

@robcxyz robcxyz commented Apr 24, 2019

Just like the standard libraries json.load(), this is an option to have the result returned in a OrderedDict. Didn't implement it to the t like json.load() but close enough and good enough for my use.

@virtuald
Copy link
Owner

Does this work for nested structures? Would be good to update the test for that.

@robcxyz
Copy link
Author

robcxyz commented Apr 30, 2019

This was a super quick hack for me to get order when I was printing my dicts but since I have found a workaround and noticed the whole discussion around json2hcl which I am thinking about wrapping for my use case. I'll let you know if I get motivated to work on #41 alongside this as with hcl2 coming soon, I don't think anyone is going to be interested in maintaining the parser with that addition.

Agreed?

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

Successfully merging this pull request may close these issues.

None yet

2 participants