Thank you very much for this tutorial and I had a lot of problems in those cases and I had not found something as complete as this because I did not know mainly if there were ways in which golang would handle them in a concrete way but as I see one has to figure it out I think there must be something for these types of cases because sometimes it is very complex to handle them but with your examples you help me on how to handle them currently, thank you very much from Mexico
I was really enjoying writing in go until i had to unmarshal complicated json... Maybe with these techniques it will be not so painful, thank you for sharing your knowledge.
4:30 struct fields should be kept CamelCased otherwise wouldn't support marshalling and unmarshalling ! Brother I actually didn't know that .Thank u so much
The problem with private fields in unmarshaling is, that there is no error returned, when the expected struct field is non existent for the returned json. Making it very hard to find these bugs.
I don't know if the language has changed or what, but i copied you example letter for letter on the "Array or single element" piece and it doesn't work. data[0] would be '[' as opposed to '"'. And in fact data[1] seems to be a escape seq "\"". Maybe ive missed something. Not spotting it yet.
Thanks for asking. Yes, that book has been a bit neglected. I do have some more content that's ready to be added, just waiting for a spare moment. I'll try to get to that sooner than later now that you've reminded me!
I've been searching for solutions for these problems a whole day.
Thanks so much this is wonderful.
Thank you very much for this tutorial and I had a lot of problems in those cases and I had not found something as complete as this because I did not know mainly if there were ways in which golang would handle them in a concrete way but as I see one has to figure it out I think there must be something for these types of cases because sometimes it is very complex to handle them but with your examples you help me on how to handle them currently, thank you very much from Mexico
This is pure gold. Thanks so much for uploading this.
Phew! I think if I encountered that “hybrid struct” type in the wild I’d ask the other team to change their API 😂
Nice video, very helpful!
Yes! Another channel on Go 😈💯🔥
Thanks so much for this. It covered all my questions and more. An excellent tutorial.
I was really enjoying writing in go until i had to unmarshal complicated json... Maybe with these techniques it will be not so painful, thank you for sharing your knowledge.
thank you for sharing experiences.
4:30 struct fields should be kept CamelCased otherwise wouldn't support marshalling and unmarshalling ! Brother I actually didn't know that .Thank u so much
Well, they need to be exported anyway 😉
The problem with private fields in unmarshaling is, that there is no error returned, when the expected struct field is non existent for the returned json. Making it very hard to find these bugs.
I don't know if the language has changed or what, but i copied you example letter for letter on the "Array or single element" piece and it doesn't work. data[0] would be '[' as opposed to '"'. And in fact data[1] seems to be a escape seq "\"".
Maybe ive missed something. Not spotting it yet.
what did you use to create this slideshow with code examples?
the book seems not complete and only 5%, do you have a plan when it will be completed?
I have the same question.
Is your book only 5% completed since 2020? When is going to be complete? Nice video.
Thanks for asking. Yes, that book has been a bit neglected. I do have some more content that's ready to be added, just waiting for a spare moment.
I'll try to get to that sooner than later now that you've reminded me!
@@boldlygo Awesome! I’ll keep an eye on it.
Your intro is “George Lucas approved” 🤩
Gene Roddenberry just rolled over in his grave! 🤣
Wait….isn’t Gene drifting in space? No grave to roll over in, right? Sorry Gene, no disrespect intended