8 func IsValidJSON(b []byte) bool {
10 err := json.Unmarshal(b, &v)
16 func (h HexBytes) MarshalText() ([]byte, error) {
17 return []byte(hex.EncodeToString(h)), nil
20 func (h *HexBytes) UnmarshalText(text []byte) error {
21 n := hex.DecodedLen(len(text))
23 _, err := hex.Decode(*h, text)
29 func (m Map) MarshalJSON() ([]byte, error) {
33 func (m *Map) UnmarshalJSON(text []byte) error {
34 var check map[string]*json.RawMessage
35 err := json.Unmarshal(text, &check)