Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Actor Proxy does not use same JsonSerializerOptions when deserializing in the non remoting API

See original GitHub issue

Expected Behavior

When using ActorProxy Create(ActorId actorId, string actorType, ActorProxyOptions options = null); with custom ActorProxyOptions for the JsonSerializerOptions then ActorProxy.InvokeMethodAsync should use the same JsonSerializerOptions for Deserializaton.

should be changed to return await JsonSerializer.DeserializeAsync<TResponse>(response, JsonSerializerOptions);

Actual Behavior

Since there are discrepancies in the serialization and desalinization the call is successful in the actor but fails to deserialize on the client side.

Steps to Reproduce the Problem

Release Note


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

rynowakcommented, May 1, 2021

Fixed in master for 1.2. Reopening this until I cut a 1.1.2 patch release with this fix.

rynowakcommented, Sep 28, 2021

This was done in 1.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to instantiate JsonSerializerOptions with System.Text. ...
If you use JsonSerializerOptions repeatedly with the same options, don't create a new JsonSerializerOptions instance each time you use it.
Read more >
Service remoting by using C# in Service Fabric
Service Fabric remoting allows clients and services to communicate with C# services by using a remote procedure call.
Read more >
System.Text.Json won't deserialize to my type even though ...
Your constructor and property names differ in case. Try setting JsonSerializerOptions.PropertyNameCaseInsensitive = true as shown in ...
Read more >
Friday the 13th JSON Attacks
It performs a weak type control by casting the deserialized object to the expected type when object has already been deserialized. During ...
Read more >
Creating and Using HTTP Client SDKs in .NET 6 - InfoQ
In this article, the author explains the process behind developing HTTP Client SDKs in .NET 6. The article also contains a sample SDK...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found