JSON sends a JSON response with status code.
(code int, i any)
| 567 | |
| 568 | // JSON sends a JSON response with status code. |
| 569 | func (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. |
| 574 | func (c *Context) JSONPretty(code int, i any, indent string) (err error) { |