FastLED 3.9.15
Loading...
Searching...
No Matches

◆ makeResponse()

fl::json makeResponse ( bool success,
ReturnCode returnCode,
const char * message,
const fl::json & data = fl::json() )

Definition at line 95 of file AutoResearchRemote.cpp.

96 {
98 r.set("success", success);
99 r.set("returnCode", static_cast<int64_t>(static_cast<int>(returnCode)));
100 r.set("message", message);
101 if (!data.is_null() && data.has_value()) {
102 r.set("data", data);
103 }
104 return r;
105}
bool is_null() const FL_NOEXCEPT
Definition json.h:238
bool has_value() const FL_NOEXCEPT
Definition json.h:654
void set(const fl::string &key, const json &value) FL_NOEXCEPT
Definition json.h:701
static json object() FL_NOEXCEPT
Definition json.h:692

References fl::json::object(), and fl::json::set().

+ Here is the call graph for this function: