json.go 352 B

123456789
  1. package utils
  2. // JSONMarshal returns the JSON encoding of v.
  3. type JSONMarshal func(v interface{}) ([]byte, error)
  4. // JSONUnmarshal parses the JSON-encoded data and stores the result
  5. // in the value pointed to by v. If v is nil or not a pointer,
  6. // Unmarshal returns an InvalidUnmarshalError.
  7. type JSONUnmarshal func(data []byte, v interface{}) error