49 if (! jo.is_object()) { jo = json::object(); }
54 jo[
"email"s] = pod.
email;
64 if (jo.contains(
"client_secret"s)) {
67 if (jo.contains(
"email"s)) {
68 result.
email = jo.at(
"email"s);
70 if (jo.contains(
"send_attempt"s)) {
73 if (jo.contains(
"next_link"s)) {
74 result.
nextLink = jo.at(
"next_link"s);
Definition: location.hpp:10
Definition: location.hpp:10
void addToJsonIfNeeded(json &j, std::string name, T &&arg)
Definition: types.hpp:80
nlohmann::json json
Definition: jsonwrap.hpp:20
Definition: location.hpp:27
Definition: request_email_validation.hpp:13
int sendAttempt
The server will only send an email if the send_attempt is a number greater than the most recent one w...
Definition: request_email_validation.hpp:32
std::string email
The email address to validate.
Definition: request_email_validation.hpp:22
std::optional< std::string > nextLink
Optional.
Definition: request_email_validation.hpp:37
std::string clientSecret
A unique string generated by the client, and used to identify the validation attempt.
Definition: request_email_validation.hpp:19
static void from_json(const json &jo, RequestEmailValidation &result)
Definition: request_email_validation.hpp:61
static void to_json(json &jo, const RequestEmailValidation &pod)
Definition: request_email_validation.hpp:47