Add a distinct Buffer type for encoding binary data in JSON responses. Treated like a string, but allows other consumers (a-la node-osrm) to recognize and not break string encodings.

This commit is contained in:
Daniel Patterson
2016-02-19 14:41:29 -08:00
committed by Patrick Niklaus
parent 5dc7b79bb6
commit 26453af1b9
3 changed files with 26 additions and 1 deletions
+1 -1
View File
@@ -333,7 +333,7 @@ template <class DataFacadeT> class TilePlugin final : public BasePlugin
}
}
json_result.values["pbf"] = buffer;
json_result.values["pbf"] = osrm::util::json::Buffer(buffer);
return Status::Ok;
}