@adlrocha Weekly Newsletter

Share this post

@adlrocha - Never take Marshaling for granted

adlrocha.substack.com

@adlrocha - Never take Marshaling for granted

Marshaling dynamic types in Go.

adlrocha
Mar 21, 2021
Share this post

@adlrocha - Never take Marshaling for granted

adlrocha.substack.com

Click here for a more pleasent reading experience

We sometimes take marshaling for granted, but there is more than one occasion in which you have no choice but to write your own custom marshaller.  Either because your compiler/marshal library is not able to infer how to automatically marshal your objects, because your marshaler is not generating the right output (we saw last week how a JSON document can be parsed with different values across microservices, leading to a variety of potential security risk), etc. The fact is that for one reason or the other, one day you may end up having to tinker with your marshaller, and you better be prepared if you don’t want to drain your time trying to make things work. This is exactly what happened to me this week. Let me walk you through the marvelous world of interface marshaling in Golang.

This publication is full of code and it was hard to make it readable directly from Substack. I have been forced to host it somewhere else to offer you the best of the experiences. If you want to keep reading, go here.

Share this post

@adlrocha - Never take Marshaling for granted

adlrocha.substack.com
Comments
TopNewCommunity

No posts

Ready for more?

© 2023 Alfonso de la Rocha
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing