mu-find: restore JSON output

Fixes #2453
This commit is contained in:
Dirk-Jan C. Binnema 2023-03-30 21:10:58 +03:00
parent f077c5a450
commit 72096bfed6
2 changed files with 5 additions and 2 deletions

View File

@ -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;

View File

@ -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)"}
},