Ask questionsPlease allow the struct tag to be changed to "json"

I find no way to tell the yaml package to just use "json" as the tag. This is quite unfortunate because I have no control over the generated structs (which are actually produced by the protobuf compiler and get json tags by default) but I need to parse these from YAML.

I would be rather trivial to provide an option as the name of the tag to use. TBH the state of go right now is that most people add json tags to their structs but not yaml tags. It is quite pointless to add multiple tags and often we have no control over the structs (because they came from someone else's code).

This has been hacked around in the past using e.g. but it is fragile and hacky. The easier solution for us right now is to just fork this repo and do a 3 char change :-).


Answer questions niemeyer

@gophobic This isn't the place for rants.


Related questions

v3 panics on bad input hot 1
v3 equivalent of v2's MapSlice and MapItem? hot 1
unmarshal with comments provide wrong structure hot 1
Head comments in list elements misplaced hot 1
Github User Rank List