News for hackers. Stuff that matters.
Re:Terminal escape sequences in Git commit email field by burntsushi on Monday March 29, 2021 @06:26PM (#26629066)
ripgrep does that already. But I just came up with my own format from whole cloth because there is no standard: https://docs.rs/grep-printer/0.1.5/grep_printer/struct.JSON....

Adding a --json flag is just the start. Ideally, other grep-like programs would need would want to emit the same format. But what happens when some grep-like programs have additional features?

Suggesting a structured representation as an output format isn't a panacea. It's just the start and it's not clear at all to me that it would be better than what we have now.

Re:Terminal escape sequences in Git commit email field by themadsens on Wednesday March 31, 2021 @02:23PM (#26651009)
I agree there is another can of worms waiting to be opened: agreeing on the schema of said json output. Also structured output is probably way more useful downstream from the likes of ls, exa, ps (say) rather than from grep like tools
Re:Terminal escape sequences in Git commit email field by kbrazil on Friday April 02, 2021 @11:34AM (#26672280)
I have created JSON schemas for the output of dozens of commands and file-types with my jc[0] project. I tried to keep them as flat as possible, but there are many other ways it could have been done. Creating the schema many times requires more thought than writing the parser itself.

[0] https://github.com/kellyjonbrazil/jc