pyhcl
pyhcl copied to clipboard
Add option to have OrderedDict hooked on load(s)
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.
Does this work for nested structures? Would be good to update the test for that.
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?