Documentation ¶
Index ¶
- func ConvertEncoding(encoding string, source string, dstEncoding string, pretty bool) (string, error)
- func FromEncoding(encoding string, source string) (interface{}, error)
- func FromJSON(s string) (interface{}, error)
- func FromXML(s string) (interface{}, error)
- func FromYAML(s string) (interface{}, error)
- func MustConvertEncoding(encoding string, source string, dstEncoding string, pretty bool) string
- func MustFromEncoding(encoding string, source string) interface{}
- func MustFromJSON(s string) interface{}
- func MustFromXML(s string) interface{}
- func MustFromYAML(s string) interface{}
- func MustToEncoding(encoding string, d interface{}, pretty bool) string
- func MustToJSON(v interface{}, pretty bool) string
- func MustToXML(v interface{}, pretty bool) string
- func MustToYAML(v interface{}, pretty bool) string
- func ToEncoding(encoding string, d interface{}, pretty bool) (string, error)
- func ToJSON(v interface{}, pretty bool) (string, error)
- func ToXML(v interface{}, pretty bool) (string, error)
- func ToYAML(v interface{}, pretty bool) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertEncoding ¶
func ConvertEncoding(encoding string, source string, dstEncoding string, pretty bool) (string, error)
ConvertEncoding converts source text from encoding to dstEncoding.
func FromEncoding ¶
FromEncoding parse specific encoding string to universal Go data.
func MustConvertEncoding ¶
MustConvertEncoding converts source text from encoding to dstEncoding. It panic if error occur.
func MustFromEncoding ¶
MustFromEncoding parse specific encoding string to universal Go data. It panic if error occur.
func MustFromJSON ¶
func MustFromJSON(s string) interface{}
MustFromJSON decode a json string to universal Go data. It panic if error.
func MustFromXML ¶
func MustFromXML(s string) interface{}
MustFromXML decode a xml string to universal Go data. It panic if error.
func MustFromYAML ¶
func MustFromYAML(s string) interface{}
MustFromYAML decode a yaml string to universal Go data. It panic if error.
func MustToEncoding ¶
MustToEncoding encode a universal Go data into specific encoding string. It panic if error occur.
func MustToJSON ¶
MustToJSON encode a Go data to json string. It panic if error.
func MustToYAML ¶
MustToYAML encode a Go data to yaml string. It panic if error.
func ToEncoding ¶
ToEncoding encode a universal Go data into specific encoding string.
Types ¶
This section is empty.