️ 使用 json-iterator 替换 encoding/json 进行一些序列化/反序列化操作

This commit is contained in:
naiba
2022-03-18 23:13:22 +08:00
parent d928f65052
commit 3ca23d8d88
14 changed files with 46 additions and 37 deletions

View File

@@ -1,7 +1,6 @@
package monitor
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
@@ -69,7 +68,7 @@ func fetchGeoIP(servers []string, isV6 bool) geoIP {
continue
}
resp.Body.Close()
err = json.Unmarshal(body, &ip)
err = utils.Json.Unmarshal(body, &ip)
if err != nil {
continue
}