Thread (4 messages) flat view 4 messages, 3 authors, 2018-03-27

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

From: Jeff Hostetler <hidden>
Date: 2018-03-27 10:24:41


On 3/26/2018 11:26 PM, Ramsay Jones wrote:
On 26/03/18 18:04, Junio C Hamano wrote:
quoted
Ramsay Jones [off-list ref] writes:
[...]
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help