MarshalJSON implements the json.Marshaler interface.
()
| 133 | |
| 134 | // MarshalJSON implements the json.Marshaler interface. |
| 135 | func (h Hash) MarshalJSON() ([]byte, error) { |
| 136 | return json.Marshal(h.String()) |
| 137 | } |
| 138 | |
| 139 | // UnmarshalJSON implements the json.Unmarshaler interface. |
| 140 | func (h *Hash) UnmarshalJSON(data []byte) (err error) { |