diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2023-03-30 21:10:58 +0300 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2023-04-02 09:26:18 +0300 |
| commit | 72096bfed65017d4213fd1533c9ba8612428f0b5 (patch) | |
| tree | aa61f301684c1b0eebec83bc8844f8a1e04fb27d | |
| parent | f077c5a450d1b3c38a663f1a2d34325800d64ee9 (diff) | |
mu-find: restore JSON output
Fixes #2453
| -rw-r--r-- | lib/utils/mu-sexp.cc | 4 | ||||
| -rw-r--r-- | mu/mu-options.cc | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/utils/mu-sexp.cc b/lib/utils/mu-sexp.cc index 4ebfd70..ecca2b1 100644 --- a/lib/utils/mu-sexp.cc +++ b/lib/utils/mu-sexp.cc @@ -1,5 +1,5 @@ /* -** Copyright (C) 2022 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> +** Copyright (C) 2022-2023 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ** ** This program is free software; you can redistribute it and/or modify it ** under the terms of the GNU General Public License as published by the @@ -224,7 +224,7 @@ Sexp::to_json_string(Format fopts) const auto it{list().begin()}; bool first{true}; while (it != list().end()) { - sstrm << (first ? "" : ",") << quote(it->string()) << ":"; + sstrm << (first ? "" : ",") << quote(it->symbol()) << ":"; ++it; sstrm << it->to_json_string(); ++it; diff --git a/mu/mu-options.cc b/mu/mu-options.cc index 4f8dc75..a96f868 100644 --- a/mu/mu-options.cc +++ b/mu/mu-options.cc @@ -256,6 +256,9 @@ sub_find(CLI::App& sub, Options& opts) { Format::Sexp, {"sexp", "S-expressions"} }, + { Format::Json, + {"json", "JSON"} + }, { Format::XQuery, {"xquery", "Show Xapian query (for debugging)"} }, |
