Documentation ¶
Index ¶
- func JsonAdapt(input, target interface{}) error
- func Marshal(v interface{}) ([]byte, error)
- func NewDecoder(reader io.Reader) *jsoniter.Decoder
- func NewEncoder(w io.Writer) *jsoniter.Encoder
- func Unmarshal(data []byte, v interface{}) error
- func UnmarshalV2(data []byte, v interface{}) error
- func Valid(data []byte) bool
- type InvalidUnmarshalError
- type JsoniterSerializer
- type MarshalerError
- type Number
- type RawMessage
- type SyntaxError
- type T
- func (*T) Descriptor() ([]byte, []int)
- func (m *T) GetA() string
- func (m *T) GetB() int64
- func (m *T) GetC() map[string]string
- func (m *T) GetD() []int64
- func (m *T) GetExtra() *TE
- func (*T) ProtoMessage()
- func (m *T) Reset()
- func (m *T) String() string
- func (m *T) XXX_DiscardUnknown()
- func (m *T) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *T) XXX_Merge(src proto.Message)
- func (m *T) XXX_Size() int
- func (m *T) XXX_Unmarshal(b []byte) error
- type TE
- func (*TE) Descriptor() ([]byte, []int)
- func (m *TE) GetA() string
- func (m *TE) GetB() int64
- func (m *TE) GetC() map[string]string
- func (m *TE) GetD() []int64
- func (*TE) ProtoMessage()
- func (m *TE) Reset()
- func (m *TE) String() string
- func (m *TE) XXX_DiscardUnknown()
- func (m *TE) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TE) XXX_Merge(src proto.Message)
- func (m *TE) XXX_Size() int
- func (m *TE) XXX_Unmarshal(b []byte) error
- type UnmarshalTypeError
- type UnsupportedTypeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Marshal ¶
Marshal delegates to jsoniterStd It is only here so this package can be a drop-in for common encoding/json uses
func NewDecoder ¶
NewDecoder delegates to jsoniterStd
func NewEncoder ¶
NewEncoder delegates to jsoniterStd
func UnmarshalV2 ¶
Unmarshal unmarshals the given data If v is a *map[string]interface{}, numbers are converted to int64 or float64
Types ¶
type InvalidUnmarshalError ¶
type InvalidUnmarshalError = json.InvalidUnmarshalError
type JsoniterSerializer ¶
type JsoniterSerializer struct{}
func (*JsoniterSerializer) Deserialize ¶
func (*JsoniterSerializer) Deserialize(data []byte, v interface{}) error
func (*JsoniterSerializer) Serialize ¶
func (*JsoniterSerializer) Serialize(v interface{}) ([]byte, error)
type MarshalerError ¶
type MarshalerError = json.MarshalerError
type RawMessage ¶
type RawMessage = json.RawMessage
type SyntaxError ¶
type SyntaxError = json.SyntaxError
type T ¶
type T struct { A string `protobuf:"bytes,1,opt,name=A,proto3" json:"A,omitempty"` B int64 `protobuf:"varint,2,opt,name=B,proto3" json:"B,omitempty"` C map[string]string `` /* 143-byte string literal not displayed */ D []int64 `protobuf:"varint,4,rep,packed,name=D,proto3" json:"D,omitempty"` Extra *TE `protobuf:"bytes,5,opt,name=Extra,proto3" json:"Extra,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*T) Descriptor ¶
func (*T) ProtoMessage ¶
func (*T) ProtoMessage()
func (*T) XXX_DiscardUnknown ¶
func (m *T) XXX_DiscardUnknown()
func (*T) XXX_Unmarshal ¶
type TE ¶
type TE struct { A string `protobuf:"bytes,1,opt,name=A,proto3" json:"A,omitempty"` B int64 `protobuf:"varint,2,opt,name=B,proto3" json:"B,omitempty"` C map[string]string `` /* 143-byte string literal not displayed */ D []int64 `protobuf:"varint,4,rep,packed,name=D,proto3" json:"D,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TE) Descriptor ¶
func (*TE) ProtoMessage ¶
func (*TE) ProtoMessage()
func (*TE) XXX_DiscardUnknown ¶
func (m *TE) XXX_DiscardUnknown()
func (*TE) XXX_Unmarshal ¶
type UnmarshalTypeError ¶
type UnmarshalTypeError = json.UnmarshalTypeError
type UnsupportedTypeError ¶
type UnsupportedTypeError = json.UnsupportedTypeError
Click to show internal directories.
Click to hide internal directories.