31 nl::json json = nl::json::object();
#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.
This object represents an answer of a user in a non-anonymous poll. https://core.telegram....
nl::json toJson() const
Serializes this object to JSON.
std::vector< std::int32_t > optionIds
0-based identifiers of chosen answer options. May be empty if the vote was retracted.
Ptr< User > user
Optional. The user that changed the answer to the poll, if the voter isn't anonymous.
PollAnswer(const nl::json &json)
void fromJson(const nl::json &json)
Deserializes this object from JSON.
Ptr< Chat > voterChat
Optional. The chat that changed the answer to the poll, if the voter is anonymous.
std::string pollId
Unique poll identifier.