summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/labstack/echo/v4/echo.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/labstack/echo/v4/echo.go')
-rw-r--r--vendor/github.com/labstack/echo/v4/echo.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/github.com/labstack/echo/v4/echo.go b/vendor/github.com/labstack/echo/v4/echo.go
index dd0cbf35..406e806b 100644
--- a/vendor/github.com/labstack/echo/v4/echo.go
+++ b/vendor/github.com/labstack/echo/v4/echo.go
@@ -90,6 +90,7 @@ type (
HidePort bool
HTTPErrorHandler HTTPErrorHandler
Binder Binder
+ JSONSerializer JSONSerializer
Validator Validator
Renderer Renderer
Logger Logger
@@ -125,6 +126,12 @@ type (
Validate(i interface{}) error
}
+ // JSONSerializer is the interface that encodes and decodes JSON to and from interfaces.
+ JSONSerializer interface {
+ Serialize(c Context, i interface{}, indent string) error
+ Deserialize(c Context, i interface{}) error
+ }
+
// Renderer is the interface that wraps the Render function.
Renderer interface {
Render(io.Writer, string, interface{}, Context) error
@@ -234,7 +241,7 @@ const (
const (
// Version of Echo
- Version = "4.3.0"
+ Version = "4.4.0"
website = "https://echo.labstack.com"
// http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
banner = `
@@ -315,6 +322,7 @@ func New() (e *Echo) {
e.TLSServer.Handler = e
e.HTTPErrorHandler = e.DefaultHTTPErrorHandler
e.Binder = &DefaultBinder{}
+ e.JSONSerializer = &DefaultJSONSerializer{}
e.Logger.SetLevel(log.ERROR)
e.StdLogger = stdLog.New(e.Logger.Output(), e.Logger.Prefix()+": ", 0)
e.pool.New = func() interface{} {