Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I fully understand the point the author is making. However, I am not going to sacrifice good JSON and make it flat just so someone can search for it more easily. With the example they give, it is still readable because it is a simple data structure. But with more complex data their flat structure to me does not make it easy to parse and easier to make mistakes as well.


It's ofter a matter of having the right tool for the job. In your case, https://github.com/tomnomnom/gron might be useful.


Well, I'd say that in the author's case it might be more useful. ;) I never really had the inclination to grep for data like the author does.

I generally work from an IDE anyway, where it is clear that I am working with a value that is part of a JSON object and I can follow it back to the proper structure anyway. In fact, the more I think about it, the more I feel like the article is written for a very specific use case and perspective. Almost to the point where the saying "if all you have is a hammer, everything looks like a nail" is applicable. Where if it doesn't look enough like a nail it should be adjusted to look more like one instead of expanding your toolbox a bit.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: