<p>UniValue is a type that encapsulates a JSON value.</p>

<p>It is only used for communication with external utilities through the RPC interface.</p>

CC BY-SA 3.0
2018-01-02T10:45:24.320Z
Thanks, what do you mean by `external utilities`
Barney Chambers
CC BY-SA 3.0
2018-01-02T11:11:01.710Z
Anything that wants to communicate with Bitcoin Core.
Pieter Wuille
CC BY-SA 3.0
2018-01-02T10:44:50.940Z
2018-01-02T10:44:50.940Z
Pieter Wuille
<p>In the bitcoin source code you can see a lot of objects of type <code>UniValue</code>, particularly in the <code>miner.cpp</code> and <code>rpc/mining.cpp</code>. What is the utility of this <code>UniValue</code> object? Is it used to update the blockchain, or simply to return a message to a miner in their console?</p>

<bitcoin-core><development><bitcoin-core-development><wallet-development>
In Bitcoin source, what is the UniValue objects purpose?
Barney Chambers
# In Bitcoin source, what is the UniValue objects purpose?

(Asked by: username_0 on 2018-01-02)

In the bitcoin source code you can see a lot of objects of type `UniValue`, particularly in the `miner.cpp` and `rpc/mining.cpp`. What is the utility of this `UniValue` object? Is it used to update the blockchain, or simply to return a message to a miner in their console?

**Tags:** bitcoin-core, development, bitcoin-core-development, wallet-development


---

## 1 answers

### Answer by username_1 on 2018-01-02. Score: 5

UniValue is a type that encapsulates a JSON value.

It is only used for communication with external utilities through the RPC interface.

> **Comments:**
> **username_0**: Thanks, what do you mean by `external utilities`  
> **username_1**: Anything that wants to communicate with Bitcoin Core.  

---

