TestRenderPureJSON() — gin Function Reference
Architecture documentation for the TestRenderPureJSON() function in render_test.go from the gin codebase.
Entity Profile
Relationship Graph
Source Code
render/render_test.go lines 240–250
func TestRenderPureJSON(t *testing.T) {
w := httptest.NewRecorder()
data := map[string]any{
"foo": "bar",
"html": "<b>",
}
err := (PureJSON{data}).Render(w)
require.NoError(t, err)
assert.JSONEq(t, "{\"foo\":\"bar\",\"html\":\"<b>\"}\n", w.Body.String())
assert.Equal(t, "application/json; charset=utf-8", w.Header().Get("Content-Type"))
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free