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

Re: [RFC PATCH 1/1] json-writer: incorrect format specifier

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Mar 27, 2018, 10:24 UTC
Message-ID
<d3fc60d1-2d8f-ec8c-cafe-f96547eff9ca@jeffhostetler.com>
In-Reply-To
<9512a1eb-2b9d-fda5-f2a5-c9f59dff972c@ramsayjones.plus.com>
On 3/26/2018 11:26 PM, Ramsay Jones wrote:
> On 26/03/18 18:04, Junio C Hamano wrote:
>> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
[...]
Show 5 quoted lines
> I must confess to not having given any thought to the wider
> implications of the code. I don't really know what this code
> is going to be used for. [Although I did shudder when I read
> some mention of a 'universal interchange format' - I still
> have nightmares about XML :-D ]
[...]

My current goals are to add telemetry in a friendly way and have events written in JSON to some audit destination. Something like:

     { "argv":["./git","status"],
       "pid":84941,
       "exit-code":0,
       "elapsed-time":0.011121,
       "version":"2.16.2.5.g71445db.dirty",
       ... }

Later, we could add a JSON formatter to a command like "status" and then do things like:

     $ git status --json | python '... json.load ...'

and eliminate the need to write custom parsers for normal or porcelain formats. There are other commands that could be similarly adapted and save callers a lot of screen-scraping code. But that is later.

Thanks, Jeff

Previous: Ramsay JonesNext: Wink Saville
Message 9 of 12 in “json-writer: incorrect format specifier”
  1. 0/1 json-writer: incorrect format specifierWink Saville, Mar 24, 2018
  2. 1/1 json-writer: incorrect format specifierWink Saville, Mar 24, 2018
  3. Jeff HostetlerMar 24, 2018
  4. Ramsay JonesMar 24, 2018
  5. Ramsay JonesMar 24, 2018
  6. Junio C HamanoMar 26, 2018
  7. Jeff HostetlerMar 26, 2018
  8. Ramsay JonesMar 27, 2018
  9. Jeff HostetlerMar 27, 2018
  10. 0/1 json-writer: add cast to uintmax_tWink Saville, Mar 24, 2018
  11. 1/1 json-writer: add cast to uintmax_tWink Saville, Mar 24, 2018
  12. Jeff HostetlerMar 26, 2018

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.