Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When both yaml and json tags are present (with differing configuration), yaml takes precedence, cannot be changed #54

Open
AnalogJ opened this issue May 30, 2024 · 1 comment

Comments

@AnalogJ
Copy link

AnalogJ commented May 30, 2024

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.

@gzuidhof
Copy link
Owner

Hmm, happy to accept a PR that fixes this - I'd say this is a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants