serializer

package
v0.0.0-...-354a747 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestJsonInterface

func TestJsonInterface(t *testing.T)

func TestJsonMarshal

func TestJsonMarshal(t *testing.T)

func TestJsonStream

func TestJsonStream(t *testing.T)

func TestJsonTag

func TestJsonTag(t *testing.T)

func TestJsonUnmarshal

func TestJsonUnmarshal(t *testing.T)

Types

type User

type User struct {
	Name      string
	IsAdmin   bool
	Followers uint
	Password  string          `json:"-"`                 // 忽略该字段
	Age       int             `json:",omitempty"`        // 如果为空就忽略这个字段,如 nil false 0 len(v)==0
	Address   string          `json:"address,omitempty"` // 别名
	Auth      json.RawMessage `json:",omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL