News for hackers. Stuff that matters.
Re:Jaq – A jq clone focused on correctness, speed, and simpl... by jjeaff on Wednesday November 29, 2023 @03:30PM (#38464854)
I agree, it wouldn't be the best to handle all json edge cases, but it would be a super easy way to quickly get data from a big chunk of simple json and you could just use subqueries or query chaining for nested results.

For anyone who hasn't used powershell, this is the difference I'm talking about. I would not be able to write either of these without looking up the syntax. But knowing very little about powershell, I can tell exactly what that command means while the bash command, not so much.

```powershell $json | ConvertFrom-Json | Select-Object -ExpandProperty x ```

```bash echo $json | jq '.x' ```

Re:Jaq – A jq clone focused on correctness, speed, and simpl... by deredede on Thursday November 30, 2023 @01:55AM (#38470518)
On the other hand, I find the bash one clear and concise. That PowerShell example is so verbose, it'd drive me crazy to do any sort of complex manipulation this way! To each their own, I guess.
Re:Jaq – A jq clone focused on correctness, speed, and simpl... by jjeaff on Friday December 01, 2023 @10:31PM (#38495622)
If all I was doing is writing code, I agree. But like most developers, I think I read a lot more code than I write.