Documentation
¶
Overview ¶
Package goccyjson contains a fast replacement for encoding/json.
Index ¶
- type CodecJSON
- func (j *CodecJSON) ContentTypes() []string
- func (j *CodecJSON) Decode(data []byte, v any) error
- func (j *CodecJSON) Decodes(_ any) bool
- func (j *CodecJSON) Encode(v any) ([]byte, error)
- func (j *CodecJSON) Encodes(_ any) bool
- func (j *CodecJSON) Exts() []string
- func (j *CodecJSON) NewDecoder(r io.Reader) codecs.Decoder
- func (j *CodecJSON) NewEncoder(w io.Writer) codecs.Encoder
- func (j *CodecJSON) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodecJSON ¶
type CodecJSON struct{}
CodecJSON implements the codecs.Marshal interface, and can be used for marshaling CodecJSON config files, and web requests.
func (*CodecJSON) ContentTypes ¶
ContentTypes returns the content types the marshaler can handle.
func (*CodecJSON) Decode ¶
Decode decodes json bytes into object v. Param v should be a pointer type.
func (*CodecJSON) Encode ¶
Encode marshals any object into json bytes. Param v should be a pointer type.
func (*CodecJSON) NewDecoder ¶
NewDecoder returns a new JSON decoder.
func (*CodecJSON) NewEncoder ¶
NewEncoder returns a new JSON encoder.
Click to show internal directories.
Click to hide internal directories.