diff --git a/OdbDesignLib/IProtoBuffable.h b/OdbDesignLib/IProtoBuffable.h index 58d4e315..c0297359 100644 --- a/OdbDesignLib/IProtoBuffable.h +++ b/OdbDesignLib/IProtoBuffable.h @@ -7,6 +7,7 @@ #include "odbdesign_export.h" #include #include +#include namespace Odb::Lib @@ -89,12 +90,11 @@ namespace Odb::Lib template inline void IProtoBuffable::from_json(const std::string& json) { - google::protobuf::StringPiece sp_json(json); // use default options google::protobuf::util::JsonOptions jsonOptions; auto pMessage = std::unique_ptr(); - auto status = google::protobuf::util::JsonStringToMessage(sp_json, pMessage.get()); + auto status = google::protobuf::util::JsonStringToMessage(absl::string_view(json), pMessage.get()); if (!status.ok()) return; from_protobuf(*pMessage); }