Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultJSONSerializer ¶
type DefaultJSONSerializer struct{}
DefaultJSONSerializer implements JSON encoding using encoding/json.
func (DefaultJSONSerializer) Deserialize ¶
func (d DefaultJSONSerializer) Deserialize(c echo.Context, i interface{}) error
Deserialize reads a JSON from a request body and converts it into an interface.
func (DefaultJSONSerializer) Serialize ¶
func (d DefaultJSONSerializer) Serialize(c echo.Context, i interface{}, indent string) error
Serialize converts an interface into a json and writes it to the response. You can optionally use the indent parameter to produce pretty JSONs.
type Json ¶
type Json struct {
// contains filtered or unexported fields
}
Json represents a goccy/go-json plugin for echo.
func NewJson ¶
func NewJson() *Json
NewJson returns a new goccy/go-json plugin with default options.
func NewJsonWithConfigPath ¶
NewJsonWithConfigPath returns a new goccy/go-json plugin with options from config path.
func NewJsonWithOptions ¶
NewJsonWithOptions returns a new goccy/go-json plugin with options.
type Options ¶
type Options struct {
Enabled bool
}
Options represents goccy/go-json plugin for fiber options.
func NewOptions ¶
NewOptions returns options from config file or environment vars.
func NewOptionsWithPath ¶
NewOptionsWithPath unmarshals a given key path into options and returns it.