MCPcopy
hub / github.com/gin-gonic/gin / BindJSON

Method BindJSON

context.go:763–765  ·  view source on GitHub ↗

BindJSON is a shortcut for c.MustBindWith(obj, binding.JSON).

(obj any)

Source from the content-addressed store, hash-verified

761
762// BindJSON is a shortcut for c.MustBindWith(obj, binding.JSON).
763func (c *Context) BindJSON(obj any) error {
764 return c.MustBindWith(obj, binding.JSON)
765}
766
767// BindXML is a shortcut for c.MustBindWith(obj, binding.BindXML).
768func (c *Context) BindXML(obj any) error {

Callers 2

TestContextBindWithJSONFunction · 0.80

Calls 1

MustBindWithMethod · 0.95

Tested by 2

TestContextBindWithJSONFunction · 0.64