This is the first open source utility I've made outside of work that I've released. It's a simple enough tool, but I think it came out fairly well. Code review and constructive criticism is always appreciated!
I took a quick scan through the source, looks simple and clean. Nice job!
There are some JSON that don’t correspond 1 to 1 to YAML and vice versa, how do you handle that?
I was curious because I have a similar tool: http://jtree.treenotation.org/sandbox/ but I explicitly state that it’s json/yaml subsets after getting feedback on that.
Currently I don't have any special handling as far as translation goes - I load both JSON and YAML into native Python data structures first and then dump them out as their interpreting libraries see fit. If you have any edge cases that I should be handling please open a GitHub issue on the project and I'd be happy to take care of it!
3 comments
[ 0.18 ms ] story [ 15.7 ms ] threadThere are some JSON that don’t correspond 1 to 1 to YAML and vice versa, how do you handle that?
I was curious because I have a similar tool: http://jtree.treenotation.org/sandbox/ but I explicitly state that it’s json/yaml subsets after getting feedback on that.
Currently I don't have any special handling as far as translation goes - I load both JSON and YAML into native Python data structures first and then dump them out as their interpreting libraries see fit. If you have any edge cases that I should be handling please open a GitHub issue on the project and I'd be happy to take care of it!