Versions in this module Expand all Collapse all v1 v1.4.3 Nov 17, 2021 v1.4.2 Nov 17, 2021 Changes in this version + const ArrayEnd + const ArraySep + const ArrayStart + const CtorNumArgsErrorf + const JSONDateFormat + func Compact(dst *bytes.Buffer, src []byte) error + func HTMLEscape(dst *bytes.Buffer, src []byte) + func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error + func Marshal(v interface{}) ([]byte, error) + func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) + func Unmarshal(data []byte, v interface{}) error + func UnmarshalBsonD(data []byte) (bson.D, error) + func UnmarshalMap(data []byte) (map[string]interface{}, error) + type BinData struct + Base64 string + Type byte + func (b BinData) MarshalJSON() ([]byte, error) + func (b BinData) String() string + type DBPointer struct + Id primitive.ObjectID + Namespace string + func (d DBPointer) MarshalJSON() ([]byte, error) + func (d DBPointer) String() string + type DBRef struct + Collection string + Database string + Id interface{} + func (d DBRef) MarshalJSON() ([]byte, error) + func (d DBRef) String() string + type Date int64 + func (d Date) MarshalJSON() ([]byte, error) + func (d Date) String() string + type Decimal128 struct + func (d128 Decimal128) MarshalJSON() ([]byte, error) + type Decoder struct + Buf []byte + R io.Reader + func NewDecoder(r io.Reader) *Decoder + func (dec *Decoder) Buffered() io.Reader + func (dec *Decoder) Decode(v interface{}) error + func (dec *Decoder) DecodeMap() (map[string]interface{}, error) + func (dec *Decoder) ScanObject() ([]byte, error) + func (dec *Decoder) UseNumber() + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (enc *Encoder) Encode(v interface{}) error + type Float float64 + func (f Float) String() string + type ISODate string + type InvalidUTF8Error struct + S string + func (e *InvalidUTF8Error) Error() string + type InvalidUnmarshalError struct + Type reflect.Type + func (e *InvalidUnmarshalError) Error() string + type JavaScript struct + Code string + Scope interface{} + func (js JavaScript) MarshalJSON() ([]byte, error) + func (js JavaScript) String() string + type Marshaler interface + MarshalJSON func() ([]byte, error) + type MarshalerError struct + Err error + Type reflect.Type + func (e *MarshalerError) Error() string + type MaxKey struct + func (MaxKey) MarshalJSON() ([]byte, error) + func (MaxKey) String() string + type MinKey struct + func (MinKey) MarshalJSON() ([]byte, error) + func (MinKey) String() string + type Number string + func (n Number) Float64() (float64, error) + func (n Number) Int32() (int32, error) + func (n Number) Int64() (int64, error) + func (n Number) String() string + func (n Number) Uint32() (uint32, error) + func (n Number) Uint64() (uint64, error) + func (n Number) Uint8() (uint8, error) + type NumberFloat float64 + func (n NumberFloat) MarshalJSON() ([]byte, error) + type NumberInt int32 + func (n NumberInt) MarshalJSON() ([]byte, error) + func (n NumberInt) String() string + type NumberLong int64 + func (n NumberLong) MarshalJSON() ([]byte, error) + func (n NumberLong) String() string + type ObjectId string + func (o ObjectId) MarshalJSON() ([]byte, error) + func (o ObjectId) String() string + type RawMessage []byte + func (m *RawMessage) MarshalJSON() ([]byte, error) + func (m *RawMessage) UnmarshalJSON(data []byte) error + type RegExp struct + Options string + Pattern string + func (r RegExp) MarshalJSON() ([]byte, error) + func (r RegExp) String() string + type SyntaxError struct + Offset int64 + func (e *SyntaxError) Error() string + type Timestamp struct + Increment uint32 + Seconds uint32 + func (t Timestamp) MarshalJSON() ([]byte, error) + func (t Timestamp) String() string + type Undefined struct + func (Undefined) MarshalJSON() ([]byte, error) + func (Undefined) String() string + type UnmarshalFieldError struct + Field reflect.StructField + Key string + Type reflect.Type + func (e *UnmarshalFieldError) Error() string + type UnmarshalTypeError struct + Type reflect.Type + Value string + func (e *UnmarshalTypeError) Error() string + type Unmarshaler interface + UnmarshalJSON func([]byte) error + type UnsupportedTypeError struct + Type reflect.Type + func (e *UnsupportedTypeError) Error() string + type UnsupportedValueError struct + Str string + Value reflect.Value + func (e *UnsupportedValueError) Error() string