Documentation ¶
Index ¶
- Variables
- func Compact(dst StringWriter, src []byte) error
- func Indent(dst StringWriter, src []byte, prefix, indent string) (err error)
- func Marshal(v interface{}) ([]byte, error)
- func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error)
- func MarshalIndentString(v interface{}, prefix, indent string) (json string, err error)
- func MarshalString(v interface{}) (string, error)
- func Unmarshal(data []byte, v interface{}) error
- func UnmarshalString(data string, v interface{}) (err error)
- type Decoder
- type Encoder
- type JSObject
- type RawMessage
- type StringWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrPointerRequired = errors.New("pointer required")
)
Errors
View Source
var (
ErrRawNil = errors.New("RawMessage cannot be nil pointer")
)
Errors
Functions ¶
func Compact ¶
func Compact(dst StringWriter, src []byte) error
func MarshalIndent ¶
MarshalIndent is like Marshal, but applies the given indentation and prefix to the beginning of the line
func MarshalIndentString ¶
MarshalIndentString is like MarshalIndent, but outputs a string
func MarshalString ¶
MarshalString encodes v into a byte slice, using the same rules as stdlib/json
func UnmarshalString ¶
Types ¶
type RawMessage ¶
type RawMessage []byte
func (*RawMessage) MarshalJSON ¶
func (r *RawMessage) MarshalJSON() ([]byte, error)
func (*RawMessage) UnmarshalJSON ¶
func (r *RawMessage) UnmarshalJSON(data []byte) error
type StringWriter ¶
Click to show internal directories.
Click to hide internal directories.