git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Structured (ie: json) output for query commands?

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Jun 30, 2021, 23:27 UTC
Message-ID
<CACPiFCLAm+e_JRc=eAt_rqwCWASqr19nXdk0zWqLbTEgELL81w@mail.gmail.com>
In-Reply-To
<YNzR5ZZDTfcN2Q+s@camp.crustytoothpaste.net>

On Wed, Jun 30, 2021 at 4:20 PM brian m. carlson <sandals@crustytoothpaste.net> wrote:

> I'm personally fine with the ad-hoc approach we use now, which is
> actually very convenient to script and, in my view, not to terrible to
> parse in other tools and languages.  Your mileage may vary, though.

It's of one piece with the Unix tradition that gave us Perl. That's both a blessing and a curse.

Outputting fields, escapes, etc and the ability to use xpath to extract, manipulate and query specific data is... very useful. There's a hard tradeoff with utf-8, and any attempt at papering over that - iconv conversions, etc – will inevitably munge data in some cases.

hmmm,
m
-- 
 martin.langhoff@gmail.com
 - ask interesting questions  ~  http://linkedin.com/in/martinlanghoff
 - don't be distracted        ~  http://github.com/martin-langhoff
   by shiny stuff
Previous: brian m. carlsonNext: Jeff King
Message 6 of 11 in “Structured (ie: json) output for query commands?”
  1. Martin LanghoffJun 30, 2021
  2. Jeff KingJun 30, 2021
  3. Martin LanghoffJun 30, 2021
  4. Jeff KingJul 1, 2021
  5. brian m. carlsonJun 30, 2021
  6. Martin LanghoffJun 30, 2021
  7. Jeff KingJul 1, 2021
  8. brian m. carlsonJul 1, 2021
  9. Jeff KingJul 1, 2021
  10. Ævar Arnfjörð BjarmasonJul 2, 2021
  11. Han-Wen NienhuysJul 1, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.