json.go
raw| 1 | package utils |
| 2 | |
| 3 | // JSONMarshal returns the JSON encoding of v. |
| 4 | type JSONMarshal func(v any) ([]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 any) error |