MCPcopy
hub / github.com/labstack/echo / JSON

Method JSON

context.go:569–571  ·  view source on GitHub ↗

JSON sends a JSON response with status code.

(code int, i any)

Source from the content-addressed store, hash-verified

567
568// JSON sends a JSON response with status code.
569func (c *Context) JSON(code int, i any) (err error) {
570 return c.json(code, i, "")
571}
572
573// JSONPretty sends a pretty-print JSON with status code.
574func (c *Context) JSONPretty(code int, i any, indent string) (err error) {

Calls 1

jsonMethod · 0.95