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

Any reason why you would use jq over Python? Certainly this can be attributed to my lack of knowledge in jq, but anything beyond a simple query is going to be done with Python for me. Beyond not having to look up query syntax, doing it in Python (or any script) is easier to read (both during and after writing it) due to auto formatting in an editor.


> Any reason why you would use jq over Python?

To give an example from another context: This is a bit like asking "why would you use document.querySelector() instead of just looping over childNodes directly?"


Readability is important if you're writing actual code, but for things like debugging a giant JSON blob from an API request JQ is far faster IMHO.




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

Search: