diff --git a/lib/utils/mu-sexp.cc b/lib/utils/mu-sexp.cc index 4ebfd70c..ecca2b10 100644 --- a/lib/utils/mu-sexp.cc +++ b/lib/utils/mu-sexp.cc @@ -1,5 +1,5 @@ /* -** Copyright (C) 2022 Dirk-Jan C. Binnema +** Copyright (C) 2022-2023 Dirk-Jan C. Binnema ** ** 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 4f8dc752..a96f868e 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)"} },