implements output generation through a dedicated JSON container:
- JSON syntax is not scattered over several files, but one place - Reduces code duplication - breaking changes: - new property in json(p) formatted response: "found_alternative": True/False - returned filenames now response.js(on) or route.gpx - /hello plugin returns JSON now
This commit is contained in:
@@ -110,10 +110,10 @@ int main(int argc, const char *argv[])
|
||||
// attention: super-inefficient hack below:
|
||||
|
||||
std::stringstream my_stream;
|
||||
for (const std::string &line : osrm_reply.content)
|
||||
for (const auto &element : osrm_reply.content)
|
||||
{
|
||||
std::cout << line;
|
||||
my_stream << line;
|
||||
std::cout << element;
|
||||
my_stream << element;
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user