FastLED 3.10.8
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 5 of file types.cpp.hpp.

5 {
6 fl::json obj = fl::json::object();
7 obj.set("function", functionName);
8 obj.set("result", result);
9 obj.set("scheduledAt", static_cast<i64>(scheduledAt));
10 obj.set("receivedAt", static_cast<i64>(receivedAt));
11 obj.set("executedAt", static_cast<i64>(executedAt));
12 obj.set("wasScheduled", wasScheduled);
13 return obj;
14}
void set(const fl::string &key, const json &value) FL_NO_EXCEPT
Definition json.h:866
static json object() FL_NO_EXCEPT
Definition json.h:857
fl::i64 i64
Definition stdint.h:221
u32 executedAt
Definition types.h:20
u32 receivedAt
Definition types.h:19
fl::json result
Definition types.h:17
bool wasScheduled
Definition types.h:21
u32 scheduledAt
Definition types.h:18
fl::string functionName
Definition types.h:16

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

+ Here is the call graph for this function: