types

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StringInt64

type StringInt64 int64

StringInt64 自定义 int64 类型 序列化JSON为string,反序列化支持string、int64输入

func (StringInt64) MarshalJSON

func (s StringInt64) MarshalJSON() ([]byte, error)

MarshalJSON 将 int64 序列化为字符串

func (*StringInt64) UnmarshalJSON

func (s *StringInt64) UnmarshalJSON(b []byte) error

UnmarshalJSON 反序列化,支持字符串和数字

type StringInt64Slice

type StringInt64Slice []int64

StringInt64Slice 自定义 []int64 类型

func (StringInt64Slice) MarshalJSON

func (s StringInt64Slice) MarshalJSON() ([]byte, error)

MarshalJSON 将 []int64 序列化为字符串数组

func (*StringInt64Slice) UnmarshalJSON

func (s *StringInt64Slice) UnmarshalJSON(b []byte) error

UnmarshalJSON 反序列化,支持字符串数组和数字数组

Jump to

Keyboard shortcuts

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