Documentation ¶
Index ¶
Constants ¶
View Source
const Name = "json"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Int64String ¶
type Int64String int64
Int64String is a go int64 type.
which can marshal into json string, and unmarshal from json string or json number.
type User struct { UID Int64String `json:"uid"` }
so we can marshal into
{"uid": "123456"}
unmarshal from both
{"uid": 123456}
and
{"uid": "123456"}
func (Int64String) Int ¶
func (i Int64String) Int() int
func (Int64String) Int16 ¶
func (i Int64String) Int16() int16
func (Int64String) Int32 ¶
func (i Int64String) Int32() int32
func (Int64String) Int64 ¶
func (i Int64String) Int64() int64
func (Int64String) Int8 ¶
func (i Int64String) Int8() int8
func (Int64String) MarshalJSON ¶
func (i Int64String) MarshalJSON() ([]byte, error)
func (*Int64String) UnmarshalJSON ¶
func (i *Int64String) UnmarshalJSON(bytes []byte) error
Click to show internal directories.
Click to hide internal directories.