mirror of https://github.com/djcb/mu.git
parent
344a7e4054
commit
ff1e06c7c8
|
@ -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
|
** 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
|
** 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()};
|
auto it{list().begin()};
|
||||||
bool first{true};
|
bool first{true};
|
||||||
while (it != list().end()) {
|
while (it != list().end()) {
|
||||||
sstrm << (first ? "" : ",") << quote(it->string()) << ":";
|
sstrm << (first ? "" : ",") << quote(it->symbol()) << ":";
|
||||||
++it;
|
++it;
|
||||||
sstrm << it->to_json_string();
|
sstrm << it->to_json_string();
|
||||||
++it;
|
++it;
|
||||||
|
|
|
@ -256,6 +256,9 @@ sub_find(CLI::App& sub, Options& opts)
|
||||||
{ Format::Sexp,
|
{ Format::Sexp,
|
||||||
{"sexp", "S-expressions"}
|
{"sexp", "S-expressions"}
|
||||||
},
|
},
|
||||||
|
{ Format::Json,
|
||||||
|
{"json", "JSON"}
|
||||||
|
},
|
||||||
{ Format::XQuery,
|
{ Format::XQuery,
|
||||||
{"xquery", "Show Xapian query (for debugging)"}
|
{"xquery", "Show Xapian query (for debugging)"}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue