diff --git a/src/Dapr.Actors/Client/ActorProxy.cs b/src/Dapr.Actors/Client/ActorProxy.cs index cc555312..00c4534e 100644 --- a/src/Dapr.Actors/Client/ActorProxy.cs +++ b/src/Dapr.Actors/Client/ActorProxy.cs @@ -114,7 +114,7 @@ namespace Dapr.Actors.Client await stream.FlushAsync(); var jsonPayload = Encoding.UTF8.GetString(stream.ToArray()); var response = await this.actorNonRemotingClient.InvokeActorMethodWithoutRemotingAsync(this.ActorType, this.ActorId.ToString(), method, jsonPayload, cancellationToken); - return await JsonSerializer.DeserializeAsync(response); + return await JsonSerializer.DeserializeAsync(response, JsonSerializerOptions); } /// @@ -144,7 +144,7 @@ namespace Dapr.Actors.Client public async Task InvokeMethodAsync(string method, CancellationToken cancellationToken = default) { var response = await this.actorNonRemotingClient.InvokeActorMethodWithoutRemotingAsync(this.ActorType, this.ActorId.ToString(), method, null, cancellationToken); - return await JsonSerializer.DeserializeAsync(response); + return await JsonSerializer.DeserializeAsync(response, JsonSerializerOptions); } ///