Thanks for your suggestion! I have updated the article based on your advice.
Yes, I know there are Java libraries using reflection, but I wanted to demonstrate the solution most people are likely to encounter. When I Googled this, the usage of an explicit object-mapper was the solution I repeatedly encountered, so this seems pretty common in the Java world.
I don't actually know what to think about Go generics. I am not 100% convinced Go needs them. My concern is possible increased complexity.
For C++ template based programming has been quite a disaster IMHO.
I admit though that the generics proposal for Go looks quite good. It reminds me of generics in Swift which works a lot better than generics in C++.