protoyaml-go icon indicating copy to clipboard operation
protoyaml-go copied to clipboard

Match protojson's output field order

Open Alfus opened this issue 1 year ago • 0 comments

see https://github.com/bufbuild/protoyaml-go/issues/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.

Alfus avatar Aug 09 '24 13:08 Alfus