Hacker News new | past | comments | ask | show | jobs | submit login

I'm not sure why jq has its own language which is not js based.

At least xmlstarlet has xslt for language.




Hi author of jqjq here. I don't know why Stephen Dolan designed the jq language the way he did. But for me the most attractive things about jq is the terse and pipe-friendly syntax. This allows you to write queries in shells and REPLs without the need of multiple lines, and it's easy to compose add addition pipes. And by using generators/backtracking you can do complicated traversals over tree and list without much syntax.

Now after using jq a lot think about it the other way around. The language itself is no that tied to JSON, it can be used for more things with other types then just JSON. If you interested have a look at https://github.com/wader/fq where i've tried to expand on it.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: