Marshal with nested structs #309
theseeker58
started this conversation in
General
Replies: 2 comments
-
Your schema is incorrect, it should be something like:
The schema you have is a top level union, and the decoder is looking for a registered decoder. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Got it! I have corrected the schema and it works perfectly! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there
I'm trying to get acquainted with golang in general and hamba/avro in particular. I have written a demo project to marshal a struct tagged with avro and everything works fine
The schema
And finally the json file
But when I try to create a more complex example nesting a struct named Address I get this error
avro: unable to resolve type *main.Employee
This is the new schema
And this the new structs definition
And finally the new json file
Am I missing anything? Any help?
Thank you all
Beta Was this translation helpful? Give feedback.
All reactions