@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.

Alfonso de la Rocha
Mar 21, 2021
Comment
Share

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.

CommentComment
ShareShare

Create your profile

0 subscriptions will be displayed on your profile (edit)

Skip for now

Only paid subscribers can comment on this post

Already a paid subscriber? Sign in

Check your email

For your security, we need to re-authenticate you.

Click the link we sent to , or click here to sign in.

TopNewCommunity

No posts

Ready for more?

© 2022 Alfonso de la Rocha
Privacy ∙ Terms ∙ Collection notice
Publish on Substack Get the app
Substack is the home for great writing