[#blockToJSON]
= blockToJSON
:mrdocs:

Block description to JSON

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;locks&lowbar;excluded(0x7f950b23abc0)&rsqb;&rsqb;
xref:UniValue.adoc[UniValue]
blockToJSON(
    xref:node/BlockManager.adoc[node::BlockManager]& blockman,
    xref:CBlock.adoc[CBlock] const& block,
    xref:CBlockIndex.adoc[CBlockIndex] const& tip,
    xref:CBlockIndex.adoc[CBlockIndex] const& blockindex,
    xref:TxVerbosity.adoc[TxVerbosity] verbosity,
    xref:uint256.adoc[uint256] pow&lowbar;limit);
----

== Return Value

A JSON representation of the block&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *blockman*
| The block manager used to read block data from disk&period;
| *block*
| The block to serialize&period;
| *tip*
| The current chain tip, used to compute confirmations&period;
| *blockindex*
| The block index entry of `block&period;`
| *verbosity*
| How much per&hyphen;transaction detail to include&period;
| *pow&lowbar;limit*
| The proof&hyphen;of&hyphen;work limit used to compute difficulty&period;
|===


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