1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-23 09:43:40 +00:00
fiber/utils/json.go
2021-02-20 16:45:13 +08:00

10 lines
352 B
Go

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