Go (Golang) Custom JSON Types Example This is a cumbersome example of custom Marshal and Unmarshal of a type to/from JSON. Example includes a struct using a custom type with a custom JSON representation.