Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONSerializer ¶
type JSONSerializer struct{}
JSONSerializer 为 JSON 实现序列化接口
func (JSONSerializer) Deserialize ¶
func (JSONSerializer) Deserialize(r io.Reader, v any) error
Deserialize 反序列化数据并绑定到 v 上
type Serializer ¶
type Serializer interface {
// Serialize 序列化数据
Serialize(w io.Writer, v any, indent string) error
// Deserialize 反序列化
Deserialize(r io.Reader, v any) error
}
Serializer 序列化 json 或 xml
type XMLSerializer ¶
type XMLSerializer struct{}
func (XMLSerializer) Deserialize ¶
func (XMLSerializer) Deserialize(r io.Reader, v any) error
Click to show internal directories.
Click to hide internal directories.