Skip to content

Comments

Adding JSON export for actor subscription topology#59

Merged
ddrcode merged 2 commits intomaiko-rs:mainfrom
swaploard:feat--Adding-export-actor-hierarchy-to-JSON
Feb 10, 2026
Merged

Adding JSON export for actor subscription topology#59
ddrcode merged 2 commits intomaiko-rs:mainfrom
swaploard:feat--Adding-export-actor-hierarchy-to-JSON

Conversation

@swaploard
Copy link
Contributor

Allow to export actor hierarchy to JSON for inspection (#58)

This PR adds a Supervisor::to_json() export that provides a machine-readable view of actor subscription topology. This mirrors the information exposed by to_mermaid() but outputs structured JSON suitable for inspection, tooling, or testing.

@ddrcode ddrcode self-requested a review February 9, 2026 16:28
@ddrcode ddrcode added this to the v0.2.x (ergonomy) milestone Feb 9, 2026
@ddrcode ddrcode added the enhancement New feature or request label Feb 9, 2026
@ddrcode
Copy link
Collaborator

ddrcode commented Feb 9, 2026

Thank you for the contribution, @swaploard. I will review your code later today.

@ddrcode ddrcode linked an issue Feb 9, 2026 that may be closed by this pull request
Copy link
Collaborator

@ddrcode ddrcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your first PR and contribution to Maiko!

Please address the issues highlighted in the comments, as the code currently doesn't compile with

cargo build --features serde

Ensure that:

  • It compiles
  • The serde feature dependencies are fixed
  • ActorSubscriptionExport struct is moved inside to_json method.

Thank yout!

@swaploard
Copy link
Contributor Author

@ddrcode Thanks for the feedback!
I’ve addressed the issues:

  • The code now compiles with cargo build --features serde
  • Fixed the serde feature dependencies
  • Moved ActorSubscriptionExport inside to_json
  • Converted label() outputs into String

Please let me know if anything else needs adjustment.

Copy link
Collaborator

@ddrcode ddrcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for providing the changes, @swaploard - it looks good now. Approved.

@ddrcode ddrcode merged commit c1c29de into maiko-rs:main Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow to export actors and subscriptions to JSON for further inspection

2 participants