Home / Type/ on Type — gin Architecture

on Type — gin Architecture

Architecture documentation for the on type/interface in api.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  6f25e8f0_b8e0_f73e_9195_538bb2335427["on"]
  9ca66bd0_28cc_9f2e_12e2_eb2a3002f38c["api.go"]
  6f25e8f0_b8e0_f73e_9195_538bb2335427 -->|defined in| 9ca66bd0_28cc_9f2e_12e2_eb2a3002f38c
  style 6f25e8f0_b8e0_f73e_9195_538bb2335427 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec/json/api.go lines 22–38

type Encoder interface {
	// SetEscapeHTML specifies whether problematic HTML characters
	// should be escaped inside JSON quoted strings.
	// The default behavior is to escape &, <, and > to \u0026, \u003c, and \u003e
	// to avoid certain safety problems that can arise when embedding JSON in HTML.
	//
	// In non-HTML settings where the escaping interferes with the readability
	// of the output, SetEscapeHTML(false) disables this behavior.
	SetEscapeHTML(on bool)

	// Encode writes the JSON encoding of v to the stream,
	// followed by a newline character.
	//
	// See the documentation for Marshal for details about the
	// conversion of Go values to JSON.
	Encode(v any) error
}

Defined In

Frequently Asked Questions

What is the on type?
on is a type/interface in the gin codebase, defined in codec/json/api.go.
Where is on defined?
on is defined in codec/json/api.go at line 22.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free