When both yaml and json tags are present (with differing configuration), yaml takes precedence, cannot be changed
AnalogJ opened this issue · comments
Jason Kulatunga commented
I have a struct that looks like:
type Example struct {
ItemId string `json:"item_id,omitempty" yaml:"-"`
}
When generating using tygo, the ItemId
field is always ignored (not present in the final generated .ts file). It seems that yaml tags override json tags.
Guido Zuidhof commented
Hmm, happy to accept a PR that fixes this - I'd say this is a bug.