Documentation ¶
Index ¶
- func Encode(val interface{}, opts Options) ([]byte, error)
- func EncodeIndented(val interface{}, prefix string, indent string, opts Options) ([]byte, error)
- func EncodeInto(buf *[]byte, val interface{}, opts Options) error
- func Pretouch(vt reflect.Type) (err error)
- func Quote(s string) string
- type Encoder
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeIndented ¶
EncodeIndented is like Encode but applies Indent to format the output. Each JSON element in the output will begin on a new line beginning with prefix followed by one or more copies of indent according to the indentation nesting.
func EncodeInto ¶
EncodeInto is like Encode but uses a user-supplied buffer instead of allocating a new one.
Types ¶
Click to show internal directories.
Click to hide internal directories.