Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Unmarshal is equivalent to encoding/json.Unmarshal. Unmarshal = sonicjson.ConfigDefault.Unmarshal // Marshal is equivalent to encoding/json.Marshal. Marshal = sonicjson.ConfigDefault.Marshal // NewEncoder is equivalent to encoding/json.NewEncoder. NewEncoder = sonicjson.ConfigDefault.NewEncoder // NewDecoder is equivalent to encoding/json.NewDecoder. NewDecoder = sonicjson.ConfigDefault.NewDecoder // MarshalForDeterministicTesting marshals a value to JSON in a deterministic way for testing. // The normal sonic configuration does not guarantee deterministic output in terms of field order. // It panics if called outside of tests. MarshalForDeterministicTesting = func(v interface{}) ([]byte, error) { if !testing.Testing() { panic("MarshalForDeterministicTesting can only be called from tests") } return sonicjson.ConfigStd.Marshal(v) } )
Functions ¶
This section is empty.
Types ¶
type RawMessage ¶
type RawMessage = sonicjson.NoCopyRawMessage
RawMessage is equivalent to encoding/json.RawMessage.
Click to show internal directories.
Click to hide internal directories.