Pretty output in JSON format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Howdy git folk,

I want to revive the discussion on JSON output. I see a discussion in
2021 about it, but it didnt come to a resolution. That discussion was
talking about adding a --json flag. I have a slightly different
approach.

I see online that many people have tried to make various hacks to
convert git output into JSON, but they all lack completeness,
especially with log messages with arbitrary text. I believe the best
and most correct way to get JSON output from git is to add it as a new
format to the pretty option. Then, it would be easy to pipe the output
into something like jq to parse the JSON.  Trying to convert git's
output into JSON is a losing proposition. You've already lost some of
the context of the output by getting it out of the git program itself.
A pretty option would provide a standard way to get correct JSON
output, with git's code handling the weird corner cases.

What do y'all think?

Cheers,
Ron Ziroby Romero




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux