mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
improve code Introduce according to grouping
This commit is contained in:
@ -11,6 +11,7 @@ import (
|
||||
"bytes"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
)
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/clbanning/mxj/v2"
|
||||
|
||||
"github.com/gogf/gf/v2/encoding/gcharset"
|
||||
"github.com/gogf/gf/v2/text/gregex"
|
||||
)
|
||||
@ -63,9 +64,8 @@ func ToJson(content []byte) ([]byte, error) {
|
||||
mv, err := mxj.NewMapXml(res)
|
||||
if err == nil {
|
||||
return mv.Json()
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// convert does convert the encoding of given XML content from XML root tag into UTF-8 encoding content.
|
||||
|
||||
Reference in New Issue
Block a user