# ReturnAsync Method

## Overloads

| [ReturnAsync<T>(Func<JToken, Task<T>>)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.Response.ReturnAsync.htm#Qlik_Sense_JsonRpc_Response_ReturnAsync__1_System_Func_Newtonsoft_Json_Linq_JToken_System_Threading_Tasks_Task___0___) |  | Deserializes the return value of an RPC response. Equivalent to calling [ResultAsync<T>(String, Func<JToken, Task<T>>)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.Response.ResultAsync.htm#Qlik_Sense_JsonRpc_Response_ResultAsync__1_System_String_System_Func_Newtonsoft_Json_Linq_JToken_System_Threading_Tasks_Task___0___)<br>with parameter "name" set to "qReturn". |
| --- | --- | --- |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.Response.ReturnAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.Response.ReturnAsync.htm)

## ReturnAsync&lt;T&gt;(Func&lt;JToken, Task&lt;T&gt;&gt;)

Deserializes the return value of an RPC response. Equivalent to calling [ResultAsync<T>(String, Func<JToken, Task<T>>)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonRpc.Response.ResultAsync.htm#Qlik_Sense_JsonRpc_Response_ResultAsync__1_System_String_System_Func_Newtonsoft_Json_Linq_JToken_System_Threading_Tasks_Task___0___) with parameter "name" set to "qReturn".

### Declaration

```

          public Task<T> ReturnAsync<T>(Func<JToken, Task<T>> deserializer)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.Func&lt;Newtonsoft.Json.Linq.JToken, System.Threading.Tasks.Task&lt;T&gt;&gt; | deserializer | The method to use to translate a token to the target type. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;T&gt; | A task that resolves the deserialized value. |

### Type Parameters

| Name | Description |
| --- | --- |
| T | The type to which the json response should be deserialized. |