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

Method BSON

context.go:1243–1245  ·  view source on GitHub ↗

BSON serializes the given struct as BSON into the response body.

(code int, obj any)

Source from the content-addressed store, hash-verified

1241
1242// BSON serializes the given struct as BSON into the response body.
1243func (c *Context) BSON(code int, obj any) {
1244 c.Render(code, render.BSON{Data: obj})
1245}
1246
1247// String writes the given string into the response body.
1248func (c *Context) String(code int, format string, values ...any) {

Callers 1

NegotiateMethod · 0.95

Calls 1

RenderMethod · 0.95

Tested by

no test coverage detected