10 func (h HexBytes) MarshalText() ([]byte, error) {
11 return []byte(hex.EncodeToString(h)), nil
14 func (h *HexBytes) UnmarshalText(text []byte) error {
15 n := hex.DecodedLen(len(text))
17 _, err := hex.Decode(*h, text)
23 func (m Map) MarshalJSON() ([]byte, error) {
27 func (m *Map) UnmarshalJSON(text []byte) error {
28 var check map[string]*json.RawMessage
29 err := json.Unmarshal(text, &check)