Documentation ¶
Index ¶
- Constants
- func AsPtr(dest interface{}, rType reflect.Type) unsafe.Pointer
- func NewInt8Marshaller(tag *format.Tag) *int8Marshaller
- func ResetCache()
- type BytesPtrSlice
- type BytesSlice
- type DefaultTag
- type Filter
- type FilterEntry
- type Filters
- type MarshalInterceptor
- type MarshalerInterceptors
- type MarshallSession
- type Marshaller
- type Option
- type Options
- type Tag
- type UnmarshalInterceptor
- type UnmarshalSession
- type UnmarshalerInterceptors
- type UnmarshalerInto
- type XTag
Constants ¶
View Source
const ( DefaultTagName = "default" FormatAttribute = "format" IgnoreCaseFormatter = "ignorecaseformatter" ValueAttribute = "value" NullableAttribute = "nullable" NameAttribute = "name" RequiredAttribute = "required" Embedded = "embedded" )
View Source
const ( TagName = "json" XTagName = "jsonx" )
Variables ¶
This section is empty.
Functions ¶
func NewInt8Marshaller ¶
func ResetCache ¶
func ResetCache()
Types ¶
type BytesPtrSlice ¶
type BytesPtrSlice struct {
// contains filtered or unexported fields
}
func (*BytesPtrSlice) UnmarshalJSONArray ¶
func (b *BytesPtrSlice) UnmarshalJSONArray(d *gojay.Decoder) error
type BytesSlice ¶
type BytesSlice struct {
// contains filtered or unexported fields
}
func (*BytesSlice) UnmarshalJSONArray ¶
func (b *BytesSlice) UnmarshalJSONArray(d *gojay.Decoder) error
type DefaultTag ¶
type DefaultTag struct { Format string Name string IgnoreCaseFormatter bool Value string Nullable *bool Required *bool Embedded bool // contains filtered or unexported fields }
func NewDefaultTag ¶
func NewDefaultTag(field reflect.StructField) (*DefaultTag, error)
func (*DefaultTag) Init ¶
func (t *DefaultTag) Init(field reflect.StructField) error
func (*DefaultTag) IsNullable ¶
func (t *DefaultTag) IsNullable() bool
func (*DefaultTag) IsRequired ¶
func (t *DefaultTag) IsRequired() bool
type FilterEntry ¶
type Filters ¶
type Filters struct {
// contains filtered or unexported fields
}
func NewFilters ¶
func NewFilters(filterable ...*FilterEntry) *Filters
type MarshalInterceptor ¶
type MarshalerInterceptors ¶
type MarshalerInterceptors map[string]MarshalInterceptor
type MarshallSession ¶
type MarshallSession struct { Filters *Filters Options []interface{} *bytes.Buffer Interceptors MarshalerInterceptors }
type Marshaller ¶
type Marshaller struct {
// contains filtered or unexported fields
}
func New ¶
func New(config *config.IOConfig) *Marshaller
func (*Marshaller) Marshal ¶
func (j *Marshaller) Marshal(value interface{}, options ...interface{}) ([]byte, error)
func (*Marshaller) Unmarshal ¶
func (j *Marshaller) Unmarshal(data []byte, dest interface{}, options ...interface{}) error
type UnmarshalInterceptor ¶
type UnmarshalSession ¶
type UnmarshalSession struct { PathMarshaller UnmarshalerInterceptors Options []interface{} }
type UnmarshalerInterceptors ¶
type UnmarshalerInterceptors map[string]UnmarshalInterceptor
type UnmarshalerInto ¶
Source Files ¶
- cache.go
- default.go
- enc.go
- field.go
- filter.go
- init.go
- marshal.go
- marshallable.go
- marshaller.go
- marshaller_bool.go
- marshaller_bool_ptr.go
- marshaller_custom.go
- marshaller_float.go
- marshaller_float_ptr.go
- marshaller_inlinable.go
- marshaller_int.go
- marshaller_int_ptr.go
- marshaller_interface.go
- marshaller_map.go
- marshaller_ptr.go
- marshaller_raw_message.go
- marshaller_slice.go
- marshaller_strings.go
- marshaller_strings_ptr.go
- marshaller_struct.go
- marshaller_time.go
- marshaller_time_ptr.go
- marshaller_uint.go
- marshaller_uint_ptr.go
- option.go
- presence.go
- session.go
- tag.go
Click to show internal directories.
Click to hide internal directories.