Re: More git status --porcelain lossage
- From
Eric Raymond <esr@thyrsus.com>
- Date
- Apr 10, 2010, 19:41 UTC
- Message-ID
- <20100410194154.GB28768@thyrsus.com>
- In-Reply-To
- <m3k4sfgmjc.fsf@localhost.localdomain>
Jakub Narebski <jnareb@gmail.com>:
> Are out of your f**g mind? XML, really? XML might be good choice to > *define* _document_ formats, but is really poor data exchange / > serialization format (being overly verbose, among others). Also, XML > is not language but meta-language.
Agreed.
> I could understand providing JSON format, specified using --json > option.
You know, that's actually an interesting idea. I mentioned it previously as the not-XML if we want to build on a metaprotocol; I wasn't considering it seriously then. But I am now, and it is not without attractions. JSON would certainly solve all the delimiter and empty-object edge cases, and it has excellent extensibility.
> I think there is some GPLv2 compatibile JSON generating code > in C (MIT licensed code is GPLv2 compatibilie, isn't it?); we can > always borrow compact JSON generation code from GPSD project (if > license allows it) from ESR.
My license would allow it, but there's not really a lot of win in trying to reuse JSON generator code - writing your own printfs for it by hand is easy and fast.
Emacs Lisp has a JSON parser, so it would meet my needs.
Alternatively, a cleaned-up --porcelain -Z along the lines previously suggested would be good.
Supplying both might not be a bad idea. The volume of code involved would be low.
-- <a href="http://www.catb.org/~esr/">Eric S. Raymond</a>