Since the author wasn't nice himself to link the Github repository, I will. <a href="https://github.com/mb21/JSONedit/" rel="nofollow">https://github.com/mb21/JSONedit/</a><p>* You should create a new global variable called "app"[1], that's bad because it will create collisions with other stuff.<p>* The directives.js contains other directives than just the json thing[2] . Are they meant to be used with the jsonedit or is it something for the demo?<p>* The directive have a lot of things to do. You can notice that when you have HTML and a mixed stuff in the directive. Try taking all the calculations, parsing and actual functionality that have with the data to do, and move in into a provider. Let the directive only handle how to show and interact with stuff. You should have a read about separation of concerns[4] and single responsibility principle[5].<p>Other than that, I like the idea and I would use this when debugging stuff in my AngularJS, if it were easier the actually include. It seems to be dependent on Angular UI for some strange reason. Handy that you can edit the data live. Nice work!<p>[1] <a href="https://github.com/mb21/JSONedit/blob/gh-pages/js/directives.js#L1" rel="nofollow">https://github.com/mb21/JSONedit/blob/gh-pages/js/directives...</a><p>[2] <a href="https://github.com/mb21/JSONedit/blob/gh-pages/js/directives.js#L12-L27" rel="nofollow">https://github.com/mb21/JSONedit/blob/gh-pages/js/directives...</a> and <a href="https://github.com/mb21/JSONedit/blob/gh-pages/js/directives.js#L31-L38" rel="nofollow">https://github.com/mb21/JSONedit/blob/gh-pages/js/directives...</a><p>[3] <a href="https://github.com/mb21/JSONedit/blob/gh-pages/js/directives.js#L166-L239" rel="nofollow">https://github.com/mb21/JSONedit/blob/gh-pages/js/directives...</a><p>[4] <a href="https://en.wikipedia.org/wiki/Separation_of_concerns" rel="nofollow">https://en.wikipedia.org/wiki/Separation_of_concerns</a><p>[5] <a href="https://en.wikipedia.org/wiki/Single_responsibility_principle" rel="nofollow">https://en.wikipedia.org/wiki/Single_responsibility_principl...</a>
Is it just me, or do all these visual editors that have been popping up on Hacker News lately seem to be more difficult to read than Vanilla JSON?<p>One of the main founding concepts being JSON was to make a human-readable data representation. It may just be because I work with it on a daily basis, but I find that it's one of the best data formats for fast and simple readability. I find myself spending more time figuring out what's going on in these visual JSON editors than if I was simply reading the JSON directly.