MCPcopy Index your code
hub / github.com/labstack/echo / Deserialize

Method Deserialize

json.go:24–29  ·  view source on GitHub ↗

Deserialize reads a JSON from a request body and converts it into an interface.

(c *Context, target any)

Source from the content-addressed store, hash-verified

22
23// Deserialize reads a JSON from a request body and converts it into an interface.
24func (d DefaultJSONSerializer) Deserialize(c *Context, target any) error {
25 if err := json.NewDecoder(c.Request().Body).Decode(target); err != nil {
26 return ErrBadRequest.Wrap(err)
27 }
28 return nil
29}

Callers

nothing calls this directly

Calls 2

RequestMethod · 0.80
WrapMethod · 0.45

Tested by

no test coverage detected