RPCTypeCheckObj

Check that an object contains the expected keys with the expected value types.

Synopsis

Declared in <rpc/util.h>

void
RPCTypeCheckObj(
    UniValue const& o,
    std::map<std::string, UniValueType> const& typesExpected,
    bool fAllowNull = false,
    bool fStrict = false);

Parameters

NameDescription
oThe object to check.
typesExpectedMap of key names to their expected value types.
fAllowNullIf true, allow null values for the expected keys.
fStrictIf true, reject keys that are not in typesExpected.