Documentation ¶
Index ¶
- Constants
- Variables
- func AddLocaleAlias(alias string, locale *time.Location)
- func AddTimeFormatAlias(alias, format string)
- func Marshal(v interface{}) ([]byte, error)
- func SetDefaultTimeFormat(timeFormat string, timeLocation *time.Location)
- func Unmarshal(data []byte, v interface{}) error
- type CustomTimeExtension
- type Time
Constants ¶
View Source
const ( ANSIC = "ANSIC" UnixDate = "UnixDate" RubyDate = "RubyDate" RFC822 = "RFC822" RFC822Z = "RFC822Z" RFC850 = "RFC850" RFC1123 = "RFC1123" RFC1123Z = "RFC1123Z" RFC3339 = "RFC3339" RFC3339Nano = "RFC3339Nano" Kitchen = "Kitchen" Stamp = "Stamp" StampMilli = "StampMilli" StampMicro = "StampMicro" StampNano = "StampNano" ShangHai = "ShangHai" )
time format alias
View Source
const ( Local = "Local" UTC = "UTC" )
time zone alias
Variables ¶
View Source
var CustomTimeFormat = jsoniter.ConfigCompatibleWithStandardLibrary
Functions ¶
func AddLocaleAlias ¶
func AddTimeFormatAlias ¶
func AddTimeFormatAlias(alias, format string)
func SetDefaultTimeFormat ¶
Types ¶
type CustomTimeExtension ¶
type CustomTimeExtension struct {
jsoniter.DummyExtension
}
func (*CustomTimeExtension) UpdateStructDescriptor ¶
func (extension *CustomTimeExtension) UpdateStructDescriptor(structDescriptor *jsoniter.StructDescriptor)
type Time ¶ added in v1.1.5
Time 自定义时间
func (Time) MarshalJSON ¶ added in v1.1.5
MarshalJSON implements json marshal interface.
func (*Time) UnmarshalJSON ¶ added in v1.1.5
UnmarshalJSON implements json unmarshal interface.
Click to show internal directories.
Click to hide internal directories.