Skip to content

JObject transport integer replacements #4463

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mrn-aglic opened this issue Jun 8, 2020 · 3 comments
Closed

JObject transport integer replacements #4463

mrn-aglic opened this issue Jun 8, 2020 · 3 comments

Comments

@mrn-aglic
Copy link

Not sure if this is by design. But could use some help.
I'm using Akka, Akka.Cluster and Akka.Cluster.Tools version 1.4.7.
Using Newtonsoft.Json 12.0.3.

I'm using Akka.NET with .Net Core 3.1 on a OS X laptop.

I wanted to integrate an example web api that would use ClusterClient to communicate with a Cluster. The issue I have is passing a JObject from Cluster to the API project (ClusterClient to be more specific). As I can see the integers are replaced with JObjects

{
  "Id": {
    "$": "I2"
  },
  "Firstname": "ivo",
  "Lastname": "ivic",
  "Jmbag": "1432",
  "Email": "[email protected]",
  "Ects": {
    "$": "I40"
  },
  "IsEnrolled": true
}

Json looks normal on the Cluster end produced with JObject.FromObject(some_object).
I assume that this is the default behaviour for network transporation. However, I have not found mention of it in the docs, nor an example on how to handle it.
Additionally, I don't understand why integers needed to be replaced.

I'm using ClusterClinet.Ask(...) to get the object. The "problem" is not in the wrapper class, as the same thing happens when receiving JObject without it.

@Aaronontheweb
Copy link
Member

@mrn-aglic would you mind posting a small reproduction sample of the POCOs so we can see what exactly the input is?

@mrn-aglic
Copy link
Author

mrn-aglic commented Jun 11, 2020

@Aaronontheweb I published the example project here:
https://github.com/mrn-aglic/exercise-example/tree/master

Not finished, and may have some bugs.

To start the ClusterBackend:
dotnet run ClusterBackend.csproj /port=12000
dotnet run ClusterBackend.csproj /port=12001

To start asp app
dotnet run RS_01.csproj

TO test once everything is started, go to api:
https://localhost:5001/api/students/1

Relevant actors:

  • connectionActor in folder Actors - ASP application
  • StorageActor in ClusterBackend application

@Aaronontheweb Aaronontheweb modified the milestones: 1.4.8, 1.4.9 Jun 17, 2020
@Aaronontheweb Aaronontheweb modified the milestones: 1.4.9, 1.4.10 Jul 21, 2020
@Aaronontheweb Aaronontheweb modified the milestones: 1.4.10, 1.4.11 Aug 20, 2020
@Aaronontheweb Aaronontheweb modified the milestones: 1.4.11, 1.4.12 Nov 5, 2020
@Aaronontheweb Aaronontheweb modified the milestones: 1.4.12, 1.4.13 Nov 16, 2020
@Aaronontheweb Aaronontheweb modified the milestones: 1.4.13, 1.4.14 Dec 16, 2020
@Aaronontheweb Aaronontheweb modified the milestones: 1.4.14, 1.4.15 Dec 30, 2020
@Aaronontheweb Aaronontheweb modified the milestones: 1.4.15, 1.4.16 Jan 20, 2021
@Aaronontheweb Aaronontheweb modified the milestones: 1.4.17, 1.4.18 Mar 11, 2021
@Aaronontheweb Aaronontheweb modified the milestones: 1.4.18, 1.4.19 Mar 23, 2021
@Aaronontheweb Aaronontheweb modified the milestones: 1.4.19, 1.4.20 Apr 28, 2021
@Aaronontheweb Aaronontheweb modified the milestones: 1.4.20, 1.4.21 May 12, 2021
@Aaronontheweb Aaronontheweb removed this from the 1.4.21 milestone Jun 16, 2021
@Aaronontheweb
Copy link
Member

Closing this - looks like we do it by design, per this comment:

#6502 (comment)

@Aaronontheweb Aaronontheweb closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants