Documentation ¶
Index ¶
- Constants
- Variables
- func Marshal(val any) []byte
- func MarshalLogString(val any) string
- func MarshalString(val any) string
- func Unmarshal(bts []byte, val any)
- func UnmarshalLogString(input string, val any)
- func UnmarshalString(input string, val any)
- type API
- type GeneralDateExtension
- type SafeInt64Extension
- func (extension *SafeInt64Extension) CreateDecoder(typ reflect2.Type) jsoniter.ValDecoder
- func (extension *SafeInt64Extension) CreateEncoder(typ reflect2.Type) jsoniter.ValEncoder
- func (extension *SafeInt64Extension) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator)
- func (extension *SafeInt64Extension) Encode(ptr unsafe.Pointer, stream *jsoniter.Stream)
- func (extension *SafeInt64Extension) IsEmpty(ptr unsafe.Pointer) bool
- type SafeUint64Extension
- func (extension *SafeUint64Extension) CreateDecoder(typ reflect2.Type) jsoniter.ValDecoder
- func (extension *SafeUint64Extension) CreateEncoder(typ reflect2.Type) jsoniter.ValEncoder
- func (extension *SafeUint64Extension) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator)
- func (extension *SafeUint64Extension) Encode(ptr unsafe.Pointer, stream *jsoniter.Stream)
- func (extension *SafeUint64Extension) IsEmpty(ptr unsafe.Pointer) bool
- type SliceMaxLenExtension
- type StringMaxLenExtension
Constants ¶
View Source
const ( JsonSafeMaxInteger = (1 << 53) - 1 JsonSafeMinInteger = -JsonSafeMaxInteger )
Variables ¶
View Source
var LogJsoner = NewAPI().
MaxStringFieldLen(255).
MaxSliceFieldLen(64).
EncodeIntegerSafely().
DecodeGeneralDate()
Functions ¶
func MarshalLogString ¶
func MarshalString ¶
func UnmarshalLogString ¶
func UnmarshalString ¶
Types ¶
type API ¶
type GeneralDateExtension ¶
type GeneralDateExtension struct {
jsoniter.DummyExtension
}
func (*GeneralDateExtension) CreateDecoder ¶
func (extension *GeneralDateExtension) CreateDecoder(typ reflect2.Type) jsoniter.ValDecoder
type SafeInt64Extension ¶
type SafeInt64Extension struct {
jsoniter.DummyExtension
}
func (*SafeInt64Extension) CreateDecoder ¶
func (extension *SafeInt64Extension) CreateDecoder(typ reflect2.Type) jsoniter.ValDecoder
func (*SafeInt64Extension) CreateEncoder ¶
func (extension *SafeInt64Extension) CreateEncoder(typ reflect2.Type) jsoniter.ValEncoder
func (*SafeInt64Extension) Decode ¶
func (extension *SafeInt64Extension) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator)
type SafeUint64Extension ¶
type SafeUint64Extension struct {
jsoniter.DummyExtension
}
func (*SafeUint64Extension) CreateDecoder ¶
func (extension *SafeUint64Extension) CreateDecoder(typ reflect2.Type) jsoniter.ValDecoder
func (*SafeUint64Extension) CreateEncoder ¶
func (extension *SafeUint64Extension) CreateEncoder(typ reflect2.Type) jsoniter.ValEncoder
func (*SafeUint64Extension) Decode ¶
func (extension *SafeUint64Extension) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator)
type SliceMaxLenExtension ¶
type SliceMaxLenExtension struct { jsoniter.DummyExtension MaxLen int // contains filtered or unexported fields }
func (*SliceMaxLenExtension) DecorateEncoder ¶
func (extension *SliceMaxLenExtension) DecorateEncoder(typ reflect2.Type, encoder jsoniter.ValEncoder) jsoniter.ValEncoder
type StringMaxLenExtension ¶
type StringMaxLenExtension struct { jsoniter.DummyExtension MaxLen int // contains filtered or unexported fields }
func (*StringMaxLenExtension) DecorateEncoder ¶
func (extension *StringMaxLenExtension) DecorateEncoder(typ reflect2.Type, encoder jsoniter.ValEncoder) jsoniter.ValEncoder
Click to show internal directories.
Click to hide internal directories.