protoyaml-go
protoyaml-go copied to clipboard
Match protojson's output field order
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.