Fix nlohmann_json error with old versions.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Old versions of nlohmann_json do not have support for std::string_view, std::filesystem::::path(?) and std::pair(?).
This commit is contained in:
parent
ba2161fa47
commit
de2001a442
|
@ -117,17 +117,17 @@ void json_all(const std::vector<std::vector<search::match>> &matches_all)
|
|||
{
|
||||
nlohmann::json json;
|
||||
|
||||
json["generator"] = {{"epubgrep", version}};
|
||||
json["generator"] = {{"epubgrep", std::string(version)}};
|
||||
|
||||
for (const auto &matches : matches_all)
|
||||
{
|
||||
for (const auto &match : matches)
|
||||
{
|
||||
json["matches"].push_back(
|
||||
{{"filepath_epub", match.filepath_epub},
|
||||
{{"filepath_epub", match.filepath_epub.string()},
|
||||
{"filepath_inside", match.filepath_inside},
|
||||
{"match", match.text},
|
||||
{"context", match.context},
|
||||
{"context", {match.context.first, match.context.second}},
|
||||
{"headline", match.headline},
|
||||
{"page", match.page}});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user