We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If I have a struct embedded such as
type A struct { FieldA string `json:"fieldA"` } type B struct { A FieldB string `json:"fieldB"` }
This will product the json:
{"fieldA": "abc", "fieldB": "123"}
However the tygo type looks like this:
export interface A { fieldA: string; } export interface B { A: A; fieldB: string; }
which is incorrect. Is there a way to get it to understand the embedded struct is flattened in the json?
The text was updated successfully, but these errors were encountered:
Answered my own question, thank you! https://github.com/gzuidhof/tygo/blob/main/examples/embed/embed.go
Sorry, something went wrong.
No branches or pull requests
If I have a struct embedded such as
This will product the json:
However the tygo type looks like this:
which is incorrect. Is there a way to get it to understand the embedded struct is flattened in the json?
The text was updated successfully, but these errors were encountered: