Home / Function/ TestJSONBindingBindBody() — gin Function Reference

TestJSONBindingBindBody() — gin Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f166f4eb_d135_b32e_849c_0bc960403101["TestJSONBindingBindBody()"]
  5fc3e4c8_9ce1_a1b5_76da_8025131b9864["json_test.go"]
  f166f4eb_d135_b32e_849c_0bc960403101 -->|defined in| 5fc3e4c8_9ce1_a1b5_76da_8025131b9864
  style f166f4eb_d135_b32e_849c_0bc960403101 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

binding/json_test.go lines 22–29

func TestJSONBindingBindBody(t *testing.T) {
	var s struct {
		Foo string `json:"foo"`
	}
	err := jsonBinding{}.BindBody([]byte(`{"foo": "FOO"}`), &s)
	require.NoError(t, err)
	assert.Equal(t, "FOO", s.Foo)
}

Subdomains

Frequently Asked Questions

What does TestJSONBindingBindBody() do?
TestJSONBindingBindBody() is a function in the gin codebase, defined in binding/json_test.go.
Where is TestJSONBindingBindBody() defined?
TestJSONBindingBindBody() is defined in binding/json_test.go at line 22.

Analyze Your Own Codebase

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

Try Supermodel Free