From: Eric Wong <e@80x24.org>
To: Kyle Meyer <kyle@kyleam.com>
Cc: meta@public-inbox.org
Subject: Re: JSON field names in terminal/pager output
Date: Wed, 6 Jan 2021 10:27:43 +0000 [thread overview]
Message-ID: <20210106102742.GA32320@dcvr> (raw)
In-Reply-To: <878s97ylws.fsf@kyleam.com>
Kyle Meyer <kyle@kyleam.com> wrote:
> Eric Wong writes:
>
> > Are "f", "s", "t", "c" acceptable field names to show in JSON
> > output? (instead of from/subject/to/cc)
>
> In my view they are, and, as you mention next, I like that they align
> with the search prefixes.
>
> > Anyways, the current JSON output looks something like the
> > following, comments inline
> >
> > [{
> [...]
>
> Nice.
Btw, I remember there's several JSON streaming formats. I think
"JSONL" aka "NDJSON" aka "LDJSON" is the best for interopability
with tools like jq(1) and will be the default format when stdout
is to a pipe or regular file.
"Concatenated JSON" may be nice for pretty-printing
<RS>-delimited JSON is gross, but there's an RFC behind it...
cf. https://en.wikipedia.org/wiki/JSON_streaming
>
> > "references": [
> > "<20210105090437.22801-1-e@80x24.org>",
> > "<20210105090437.22801-5-e@80x24.org>"
> > ],
> >
> > # we don't actually support searching on rereference, yet;
> > # not sure if it's needed since we already do thread # expansion
>
> Is "thread # expansion" the "num -> tid -> nums" mapping done by Over's
> expand_thread()? And, from the CLI, that will be triggered by
> `thread|t', right?
Yup. It works well for single sources (and even a single
extindex), but not when combinining multiple inboxes/extindices
since THREADID ({tid}) is per-inbox/extindex. So extra dedupe
work needs to be done...
So searching across externals needs to be parallelized. I'm
thinking SOCK_SEQPACKET Unix sockets is ideal for local
externals and hope it's usable in the modern *BSDs.
And SIGPIPE on pager exit needs to get delivered in a timely
fashion, too... (yes, little things like that really bug me :x)
prev parent reply other threads:[~2021-01-06 10:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-05 9:56 JSON field names in terminal/pager output Eric Wong
2021-01-06 0:00 ` Kyle Meyer
2021-01-06 10:27 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210106102742.GA32320@dcvr \
--to=e@80x24.org \
--cc=kyle@kyleam.com \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).