Home / Type/ Decoder Type — gin Architecture

Decoder Type — gin Architecture

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec/json/api.go lines 41–57

type Decoder interface {
	// UseNumber causes the Decoder to unmarshal a number into an any as a
	// Number instead of as a float64.
	UseNumber()

	// DisallowUnknownFields causes the Decoder to return an error when the destination
	// is a struct and the input contains object keys which do not match any
	// non-ignored, exported fields in the destination.
	DisallowUnknownFields()

	// Decode reads the next JSON-encoded value from its
	// input and stores it in the value pointed to by v.
	//
	// See the documentation for Unmarshal for details about
	// the conversion of JSON into a Go value.
	Decode(v any) error
}

Defined In

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free