
Advanced Encoding and Decoding Techniques in Go - joncalhoun
https://blog.gopheracademy.com/advent-2016/advanced-encoding-decoding/
======
themihai
The tutorial makes it seem more complicated than it actually is. JSONDog and
the constructor example has no place there.

~~~
joncalhoun
Which specific example do you mean, and do you have any suggestions on how to
improve it?

I felt this was a good approach given how aliasing builds off of it, but I may
have missed a better approach. These are just ones that have worked well for
me.

~~~
transitorykris
I believe grandparent may be referring to the first example. It's a fair bit
of reading to get to the good stuff, and if you're skimming it can look
complicated. Personally I think the approach of building up the solution is
instructive.

------
jzelinskie
Is this advanced? If you have ever or will ever attempt to implement an
idiomatic encoder/decoder in Go, you will learn everything this post talks
about.

~~~
joncalhoun
It is a relative term.

I use it here because most introductory posts about encoding/decoding in go
(like [https://blog.golang.org/json-and-go](https://blog.golang.org/json-and-
go)) don't touch on these at all. Instead many people figure each of these out
separately over time.

~~~
laumars
I'm inclined to agree with the grandparent here. It's good that you're willing
to contribute to the already impressive catalogue of Go reference material but
your guide is really more of an introduction into the JSON marshaller than
advanced techniques about encoding and decoding in the more general sense.
Sadly I do feel a little mislead by the title since I was hoping for something
a little more challenging than JSON - though had I known it was just JSON I
certainly wouldn't have opened the page so maybe the title works? ;)

On a positive note, it does look like it's well written. Detailed with clear
examples and laid out in a clean design that's easy to follow.

