Documentation ¶
Index ¶
- Variables
- func DumpBytes(obj interface{}, options ...DumpOption) ([]byte, error)
- func DumpString(obj interface{}, options ...DumpOption) (string, error)
- func MarshalString(o interface{}) string
- func MustDumpBytes(obj interface{}, options ...DumpOption) []byte
- func MustDumpString(obj interface{}, options ...DumpOption) string
- func Read(name string, v interface{}) error
- func UnquoteBytes(s []byte) (t []byte, ok bool)
- type DumpOption
- type Marshal
- type Unmarshal
Constants ¶
This section is empty.
Variables ¶
View Source
var DefMarshal = &Marshal{}
View Source
var DefUnmarshal = &Unmarshal{}
Functions ¶
func DumpBytes ¶ added in v1.2.10
func DumpBytes(obj interface{}, options ...DumpOption) ([]byte, error)
DumpBytes convert Go data object to JSON []byte
func DumpString ¶ added in v1.2.10
func DumpString(obj interface{}, options ...DumpOption) (string, error)
DumpString encode Go data object to JSON string
func MustDumpBytes ¶ added in v1.2.10
func MustDumpBytes(obj interface{}, options ...DumpOption) []byte
MustDumpBytes encode Go data object to JSON []byte (panic in case of error)
func MustDumpString ¶ added in v1.2.10
func MustDumpString(obj interface{}, options ...DumpOption) string
MustDumpString encode Go data object to JSON string (panic in case of error)
func UnquoteBytes ¶ added in v1.2.3
Types ¶
type DumpOption ¶ added in v1.2.10
func EscapeHTML ¶ added in v1.2.10
func EscapeHTML(escape bool) DumpOption
func Indent ¶ added in v1.2.10
func Indent(s string) DumpOption
Indent sets the indentation level (passed as string of spaces) for DumpBytes/DumpString
Click to show internal directories.
Click to hide internal directories.