[#BanMapFromJson]
= BanMapFromJson
:mrdocs:

Convert a JSON array to a `banmap&lowbar;t` object&period;

== Synopsis

Declared in `&lt;net&lowbar;types&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
BanMapFromJson(
    xref:UniValue.adoc[UniValue] const& bans&lowbar;json,
    xref:banmap_t.adoc[banmap&lowbar;t]& bans);
----

== Exceptions

[cols="1,4"]
|===
| Name| Thrown on
| `std&colon;&colon;runtime&lowbar;error`
| if the JSON does not have the expected fields or they contain unparsable values&period;
|===

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bans&lowbar;json* [in]
| JSON to convert, must be as returned by `BanMapToJson()`&period;
| *bans* [out]
| Bans list to create from the JSON&period;
|===


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