mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-17 22:19:42 +02:00
Rebased from main: Old CPU / Old docker version compatibility
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package route
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
|
||||
"github.com/bytedance/sonic"
|
||||
gperr "github.com/yusing/goutils/errs"
|
||||
)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (s Scheme) MarshalJSON() ([]byte, error) {
|
||||
|
||||
func (s *Scheme) UnmarshalJSON(data []byte) error {
|
||||
var v string
|
||||
if err := sonic.Unmarshal(data, &v); err != nil {
|
||||
if err := json.Unmarshal(data, &v); err != nil {
|
||||
return err
|
||||
}
|
||||
return s.Parse(v)
|
||||
|
||||
Reference in New Issue
Block a user