[#JSONRPCReplyObj]
= JSONRPCReplyObj
:mrdocs:

Build a JSON&hyphen;RPC reply object from a result or error&period;

== Synopsis

Declared in `&lt;rpc&sol;request&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:UniValue.adoc[UniValue]
JSONRPCReplyObj(
    xref:UniValue.adoc[UniValue] result,
    xref:UniValue.adoc[UniValue] error,
    std::optional&lt;UniValue&gt; id,
    xref:JSONRPCVersion.adoc[JSONRPCVersion] jsonrpc&lowbar;version);
----

== Return Value

A JSON object representing the reply&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *result*
| The result value, if the call succeeded&period;
| *error*
| The error value, if the call failed&period;
| *id*
| The request id being replied to&period;
| *jsonrpc&lowbar;version*
| The protocol version to format the reply for&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
