Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONSerializer ¶
type JSONSerializer[E jsonEncocder, D jsonDecoder] struct { Encoder func(w io.Writer) E Decoder func(r io.Reader) D }
JSONSerializer is a JSON serializer for Echo framework.
func (*JSONSerializer[E, D]) Deserialize ¶
func (j *JSONSerializer[E, D]) Deserialize(c echo.Context, i interface{}) error
Deserialize reads the JSON from the request and stores it in i.
func (*JSONSerializer[E, D]) Serialize ¶
func (j *JSONSerializer[E, D]) Serialize(c echo.Context, i interface{}, indent string) error
Serialize writes the JSON encoding of i to the response.
Click to show internal directories.
Click to hide internal directories.