From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 66D4C1F4B4; Tue, 5 Jan 2021 09:56:46 +0000 (UTC) Date: Tue, 5 Jan 2021 09:56:46 +0000 From: Eric Wong To: meta@public-inbox.org Subject: JSON field names in terminal/pager output Message-ID: <20210105095646.GA26897@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline List-Id: Are "f", "s", "t", "c" acceptable field names to show in JSON output? (instead of from/subject/to/cc) The single-chars have been used in the search queries for as long as we've had search. And I stole that UI bit from mairix(1), so there's prior art. Anyways, the current JSON output looks something like the following, comments inline [{ "blob": "d21717dae7e18dbc9efcd5ca57fe2ee92747bc06", "docid": 41946, "dt": "2021-01-05T09:24:49Z", # dt: is not an exact match for current WWW behavior which # needs YYYYMMDDHHMMSS (all digits). Getting Xapian to parse # dates from Perl (w/o custom C++) isn't possible, yet. # dt: is the date header, "UTCDate" in JMAP. "f": "Eric Wong ", # "from": might be more obvious, but seeing it thousands of # times every message might be too much "m": "<20210105092449.GA22853@dcvr>", # mid/msgid/message-id "rcvd": "2021-01-05T09:24:49Z", # IMAP calls this INTERNALDATE, JMAP calls it "receivedAt" "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 "relevance": 13, # relevance is ->get_percent from Xapian "s": "JSON pretty-printing [was: [4/4] ... (and maybe lei)]", "t": "meta@public-inbox.org" # Subject and To: headers }, { # Another message, we do "}, {" to save vertical white space rather than "},\n{" "blob": "0ee1d7d9ec9b29c1d8f103033ed06e9e48e6ebfe", "docid": 41930, # side note: it's probably not worth displaying docid for # ephemeral search indices like LeiXSearch "dt": "2021-01-05T09:04:36Z", "f": "Eric Wong ", "m": "<20210105090437.22801-4-e@80x24.org>", "rcvd": "2021-01-05T09:04:38Z", "references": [ "<20210105090437.22801-1-e@80x24.org>" ], "relevance": 36, "s": "[PATCH 3/4] lei: use client env as-is, drop daemon-env command", "t": "meta@public-inbox.org" }, { ...