summaryrefslogtreecommitdiff
path: root/modules/rpc/jsonrpc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rpc/jsonrpc.cpp')
-rw-r--r--modules/rpc/jsonrpc.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/rpc/jsonrpc.cpp b/modules/rpc/jsonrpc.cpp
index ad46bcb13..22c00b118 100644
--- a/modules/rpc/jsonrpc.cpp
+++ b/modules/rpc/jsonrpc.cpp
@@ -171,10 +171,9 @@ public:
else
yyjson_mut_obj_add_strn(doc, root, "id", request.id.c_str(), request.id.length());
- if (!request.GetReplies().empty())
+ if (request.GetRoot())
{
- auto *result = yyjson_mut_obj(doc);
- SerializeMap(doc, result, request);
+ auto *result = SerializeElement(doc, request.GetRoot().value());
yyjson_mut_obj_add_val(doc, root, "result", result);
}