21 std::variant<cpr::File, std::string>
sticker{
""};
36 nl::json json = nl::json::object();
38 if (
auto idx =
sticker.index(); idx == 0)
39 json[
"sticker"] = std::get<cpr::File>(
sticker).filepath;
41 json[
"sticker"] = std::get<std::string>(
sticker);
#define OBJECT_SERIALIZE_FIELD_PTR(json, json_field, field)
#define OBJECT_DESERIALIZE_FIELD_PTR(json, json_field, field, optional)
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Available objects: https://core.telegram.org/bots/api#available-types.
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.