You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
see #36
JSON objects are unmarshaled into (unordered) go maps by default. This
PR uses yaml.Node (when possible) instead, which preserves the field
order from protojson.
Note that yaml refuses to parse control characters into yaml.Nodes,
though otherwise handle them correctly.
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.
The text was updated successfully, but these errors were encountered: