diff options
-rw-r--r-- | include/tgbot/TgTypeParser.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/tgbot/TgTypeParser.h b/include/tgbot/TgTypeParser.h index 6670753..45650c7 100644 --- a/include/tgbot/TgTypeParser.h +++ b/include/tgbot/TgTypeParser.h @@ -494,6 +494,13 @@ private: json += ','; } + inline void appendToJson(std::string& json, const std::string& varName, const char* value) const { + if(value!=nullptr){ + std::string strvalue(value); + appendToJson(json,varName,strvalue); + } + } + inline void appendToJson(std::string& json, const std::string& varName, const char *value) const { appendToJson(json, varName, std::string(value)); } void appendToJson(std::string& json, const std::string& varName, const std::string& value) const; |