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

◆ to_json()

fl::json fl::RpcResult::to_json ( ) const

Serialize result to JSON object (compact single-line format)

Returns
JSON object with all result fields

Definition at line 4 of file types.cpp.hpp.

4 {
5 fl::json obj = fl::json::object();
6 obj.set("function", functionName);
7 obj.set("result", result);
8 obj.set("scheduledAt", static_cast<i64>(scheduledAt));
9 obj.set("receivedAt", static_cast<i64>(receivedAt));
10 obj.set("executedAt", static_cast<i64>(executedAt));
11 obj.set("wasScheduled", wasScheduled);
12 return obj;
13}
void set(const fl::string &key, const json &value) FL_NOEXCEPT
Definition json.h:701
static json object() FL_NOEXCEPT
Definition json.h:692
fl::i64 i64
Definition s16x16x4.h:222
u32 executedAt
Definition types.h:19
u32 receivedAt
Definition types.h:18
fl::json result
Definition types.h:16
bool wasScheduled
Definition types.h:20
u32 scheduledAt
Definition types.h:17
fl::string functionName
Definition types.h:15

References executedAt, functionName, fl::json::object(), receivedAt, result, scheduledAt, fl::json::set(), and wasScheduled.

+ Here is the call graph for this function: