OSDN Git Service

Thanos did someting
[bytom/vapor.git] / encoding / json / json.go
diff --git a/encoding/json/json.go b/encoding/json/json.go
deleted file mode 100644 (file)
index 0ad7b6a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-package json
-
-import (
-       "encoding/hex"
-       "encoding/json"
-)
-
-type HexBytes []byte
-
-func (h HexBytes) MarshalText() ([]byte, error) {
-       return []byte(hex.EncodeToString(h)), nil
-}
-
-func (h *HexBytes) UnmarshalText(text []byte) error {
-       n := hex.DecodedLen(len(text))
-       *h = make([]byte, n)
-       _, err := hex.Decode(*h, text)
-       return err
-}
-
-type Map []byte
-
-func (m Map) MarshalJSON() ([]byte, error) {
-       return m, nil
-}
-
-func (m *Map) UnmarshalJSON(text []byte) error {
-       var check map[string]*json.RawMessage
-       err := json.Unmarshal(text, &check)
-       if err != nil {
-               return err
-       }
-       *m = text
-       return nil
-}