code: @SuppressWarnings("unchecked") 
      public Map marshal(Contract contract) throws RpcException {
          Map map = new HashMap();
          map.put("jsonrpc", "2.0");
  
          if (id != null)
              map.put("id", id);
  
          map.put("method", method.getMethod());
  
          if (params != null && params.length > 0) {
              Function f = contract.getFunction(getIface(), getFunc());
              map.put("params", f.marshalParams(this));
          }
  
          return map;
      }
docs: Marshals this request to a Map that can be serialized and sent over the wire.
  Uses the Contract to resolve the Function associated with the method.
  
  @param contract Contract to use to resolve Function
  @return JSON-RPC formatted Map based on the request id, method, and params