Home / Function/ Encode() — gin Function Reference

Encode() — gin Function Reference

Architecture documentation for the Encode() function in json_test.go from the gin codebase.

Function go DataBinding Validators calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  6d763ead_d8b2_997c_ee70_e27c96ce0eca["Encode()"]
  a6e554a3_c7ac_56a2_ca69_1a025a5c2af9["Encode()"]
  a6e554a3_c7ac_56a2_ca69_1a025a5c2af9 -->|calls| 6d763ead_d8b2_997c_ee70_e27c96ce0eca
  a6e554a3_c7ac_56a2_ca69_1a025a5c2af9["Encode()"]
  6d763ead_d8b2_997c_ee70_e27c96ce0eca -->|calls| a6e554a3_c7ac_56a2_ca69_1a025a5c2af9
  style 6d763ead_d8b2_997c_ee70_e27c96ce0eca fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

binding/json_test.go lines 138–145

func (tc timeCodec) Encode(ptr unsafe.Pointer, stream *jsoniter.Stream) {
	t := *((*time.Time)(ptr))
	if t.Equal(zeroTime) {
		stream.WriteNil()
		return
	}
	stream.WriteString(t.In(time.Local).Format("2006-01-02 15:04:05.000"))
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does Encode() do?
Encode() is a function in the gin codebase.
What does Encode() call?
Encode() calls 1 function(s): Encode.
What calls Encode()?
Encode() is called by 1 function(s): Encode.

Analyze Your Own Codebase

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

Try Supermodel Free