MCPcopy Create free account
hub / github.com/kataras/iris / writeJSON

Method writeJSON

context/context.go:4366–4375  ·  view source on GitHub ↗
(v interface{}, options *JSON)

Source from the content-addressed store, hash-verified

4364}
4365
4366func (ctx *Context) writeJSON(v interface{}, options *JSON) error {
4367 ctx.ContentType(ContentJSONHeaderValue)
4368
4369 // After content type given and before everything else, try handle proto or easyjson, no matter the performance mode.
4370 if handled, _, err := ctx.handleSpecialJSONResponseValue(v, options); handled {
4371 return err
4372 }
4373
4374 return WriteJSON(ctx, v, options)
4375}
4376
4377var finishCallbackB = []byte(");")
4378

Callers 3

StopWithJSONMethod · 0.95
JSONMethod · 0.95
ProblemMethod · 0.95

Calls 2

ContentTypeMethod · 0.95

Tested by

no test coverage detected