rpcObjectParams

Methods marked with this attribute will see its parameters rendered as an object (if applicable by the protocol).

  1. RpcMethodObjectParams rpcObjectParams()
  2. RpcMethodObjectParams rpcObjectParams(string[string] names)
    @safe
    rpcObjectParams
    (
    string[string] names
    )

Examples

interface IAPI
{
    @rpcObjectParams
    void submit(string hash);
    // In json-rpc params will be rendered as: "params": {"hash": "dZf4F"}
}
interface IAPI
{
    @rpcObjectParams(["hash": "hash_renamed"])
    void submit(string hash);
    // In json-rpc params will be rendered as: "params": {"hash_renamed": "dZf4F"}
}

Meta