Skip to content
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

Allow the _to_json of AgentID to be used to generate the JSON for AgentIDs #318

Merged
merged 1 commit into from
Jul 21, 2024

Conversation

notthetup
Copy link
Collaborator

In Message constructors of fjage.py we were forcing all the AgentID types to be converted to v.name before setting their values on the message objects. This looses information about if a AgentID is a Topic etc.

So instead, we let the _to_json method of AgentID do the proper stringification when the Message is converted to JSON.

@notthetup notthetup requested a review from mchitre July 18, 2024 09:36
@notthetup notthetup self-assigned this Jul 18, 2024
@mchitre
Copy link
Member

mchitre commented Jul 19, 2024

Any idea why we had a special case handling for AgentID in the first place?

@notthetup
Copy link
Collaborator Author

notthetup commented Jul 19, 2024

I traced where it came from. I think the logic in the Message constructor predates the _to_json logic.

4165902

@notthetup notthetup merged commit 66d13ff into master Jul 21, 2024
2 checks passed
@notthetup notthetup deleted the fjagepy-agentid branch July 21, 2024 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants