Documentation ¶
Overview ¶
Package json provides a mockable wrapper for encoding/json.
Index ¶
- type Impl
- func (*Impl) Compact(dst *bytes.Buffer, src []byte) error
- func (*Impl) HTMLEscape(dst *bytes.Buffer, src []byte)
- func (*Impl) Indent(dst *bytes.Buffer, src []byte, prefix string, indent string) error
- func (*Impl) Marshal(v any) ([]byte, error)
- func (*Impl) MarshalIndent(v any, prefix string, indent string) ([]byte, error)
- func (*Impl) NewDecoder(r io.Reader) *json.Decoder
- func (*Impl) NewEncoder(w io.Writer) *json.Encoder
- func (*Impl) Unmarshal(data []byte, v any) error
- func (*Impl) Valid(data []byte) bool
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { Compact(dst *bytes.Buffer, src []byte) error HTMLEscape(dst *bytes.Buffer, src []byte) Indent(dst *bytes.Buffer, src []byte, prefix string, indent string) error Marshal(v any) ([]byte, error) MarshalIndent(v any, prefix string, indent string) ([]byte, error) NewDecoder(r io.Reader) *json.Decoder NewEncoder(w io.Writer) *json.Encoder Unmarshal(data []byte, v any) error Valid(data []byte) bool }
Click to show internal directories.
Click to hide internal directories.