Documentation ¶
Index ¶
- Variables
- func DumpBytes(obj interface{}, options ...DumpOption) ([]byte, error)
- func DumpString(obj interface{}, options ...DumpOption) (string, error)
- func MustDumpBytes(obj interface{}, options ...DumpOption) []byte
- func MustDumpString(obj interface{}, options ...DumpOption) string
- func Read(name string, v interface{}) error
- func ToString(o interface{}) string
- func UnQuoteBytes(s []byte) (t []byte, ok bool)
- type DumpOption
Constants ¶
This section is empty.
Variables ¶
View Source
var DefCoder = &coder{}
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.6.13
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.