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

Render Stellar Events as JSON Instead of Rust Debug Forma #1659

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

juandiegocv27
Copy link

What

This PR modifies the Stellar events output to render as JSON instead of using the Rust debug format. Additionally, it updates the path in boilerplate.rs for including the WASM file.

Why

The change is being made because developers are more familiar with the JSON format, which provides a standardized way of viewing event data. It aligns with Render events as json in stellar events pretty output instead of as rust debug issue, aiming to improve the readability and usability of the event logs for developers.

@juandiegocv27
Copy link
Author

juandiegocv27 commented Oct 8, 2024

@leighmcculloch I wrote a not right command and closed my PR🥲, this is a new one with the changes that you requested🫡🫶🏻

@fnando @graydon

@juandiegocv27
Copy link
Author

ready to review

@juandiegocv27
Copy link
Author

@willemneal let me know what you think please

@janewang
Copy link
Contributor

@juandiegocv27 could you look into the tests

);
}
OutputFormat::Plain => println!("{event}"),
OutputFormat::Pretty => event.pretty_print()?,
Copy link
Member

Choose a reason for hiding this comment

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

The hope of the issue was to address that "Events in pretty print mode print as Rust debug format," and same in the plain mode too I think. The intent is to fix that, rather than return only JSON. So each topic and the value should print as JSON, but the rest of the format should stay the same.

See:

Copy link
Author

Choose a reason for hiding this comment

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

ok sure, thank you for letting me know, i'll fix that as soon as possible

@leighmcculloch leighmcculloch marked this pull request as draft November 6, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog (Not Ready)
Development

Successfully merging this pull request may close these issues.

Render events as json in stellar events pretty output instead of as rust debug
3 participants