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