code: function serializeOperation(operation, index) {
    var params = operation.params;
  
    switch (operation.method) {
    case 'create':
      params.constructorParams = serializeParams(params.constructorParams);
      break;
  
    default:
      params = serializeParams(params);
      params.operationParams = serializeParams(params.operationParams);
    };
  
    operation.jsonrpc = "2.0";
  
    operation.id = index;
  }
docs: @function module:kurentoClient.KurentoClient~serializeOperation
  
  @param {external:Object} operation
  @param {external:Integer} index