Code is explained in the blog post : https://medium.com/gothicism/how-to-handle-user-datatypes-in-golang-with-json-and-sql-database-a62d5304b0db
This code explains how to create custom type and implements methods for read and write from json and sql database
Methods implemented are:
- json Unmarshal
- json Marshal
- Scan
- Value