Documentation ¶
Overview ¶
A codec for handling JSON encoding and decoding.
Index ¶
- type JsonCodec
- func (c *JsonCodec) CanMarshalWithCallback() bool
- func (c *JsonCodec) ContentType() string
- func (c *JsonCodec) ContentTypeSupported(contentType string) bool
- func (c *JsonCodec) FileExtension() string
- func (c *JsonCodec) Marshal(object interface{}, options map[string]interface{}) ([]byte, error)
- func (c *JsonCodec) Unmarshal(data []byte, obj interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonCodec ¶
type JsonCodec struct{}
JsonCodec converts objects to and from JSON.
func (*JsonCodec) CanMarshalWithCallback ¶
CanMarshalWithCallback returns whether this codec is capable of marshalling a response containing a callback.
func (*JsonCodec) ContentType ¶
ContentType returns the content type for this codec.
func (*JsonCodec) ContentTypeSupported ¶
func (*JsonCodec) FileExtension ¶
FileExtension returns the file extension for this codec.
Click to show internal directories.
Click to hide internal directories.