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

Retain message fields in the same order as defined in the .proto file #36

Open
MalitsPlus opened this issue May 19, 2024 · 0 comments
Open

Comments

@MalitsPlus
Copy link

MalitsPlus commented May 19, 2024

While fields in the json string output by protojson are kept in the same order as defined in the .proto file, fields in the yaml string output by protoyaml-go are sorted alphabetically.
This can be a little unfriendly to human reading in some cases. (e.g. We usually define the first field as "id", if sorted alphabetically we will have to scroll down a long way to find it)

It will be very appreciate if protoyaml-go provides an option to let users choose to keep the original order or not.

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

No branches or pull requests

1 participant