my $rpc_input = encode_json({ method => $method, args => [ @args ] }); my $rpc_output = do_rpc_call($rpc_input); return decode_json($rpc_output);