diff options
author | Sadie Powell <sadie@witchery.services> | 2025-03-13 15:47:52 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-03-13 15:49:33 +0000 |
commit | 1fcd045affd5218df7ab5a207ad5ffe5caa2ce4a (patch) | |
tree | 2680d2e310fc0703387256fe4e262d3a06668b6d /modules | |
parent | b4d068b01acedae7adb0043910bd3753dc6bfcc9 (diff) |
Fix the jsonrpc not having a root element one is not specified.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/rpc/jsonrpc.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/rpc/jsonrpc.cpp b/modules/rpc/jsonrpc.cpp index ad496708a..5d4dc3c77 100644 --- a/modules/rpc/jsonrpc.cpp +++ b/modules/rpc/jsonrpc.cpp @@ -190,6 +190,8 @@ public: auto *result = SerializeElement(doc, request.GetRoot().value()); yyjson_mut_obj_add_val(doc, root, "result", result); } + else + yyjson_mut_obj_add_null(doc, root, "result"); yyjson_mut_obj_add_str(doc, root, "jsonrpc", "2.0"); |