BanMapFromJson

Convert a JSON array to a banmap_t object.

Synopsis

Declared in <net_types.h>

void
BanMapFromJson(
    UniValue const& bans_json,
    banmap_t& bans);

Exceptions

NameThrown on
std::runtime_errorif the JSON does not have the expected fields or they contain unparsable values.

Parameters

NameDescription
bans_json [in]JSON to convert, must be as returned by BanMapToJson().
bans [out]Bans list to create from the JSON.