I\'m fairly new to Golang. And I was looking for a way to do some custom stuff for marshaling and unmarshalling json. I have found the solution to implement M
json
M
Data methods has value receiver, but the variable data has pointer type (*Data).
Data
*Data
Pointer type variables cannot use functions with value receiver. Either change variable type or receiver type.
Also see https://github.com/golang/go/wiki/CodeReviewComments#receiver-type about receivers.