|
@@ -28,7 +28,7 @@ import (
|
|
|
"time"
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/coreos/etcd/pkg/pathutil"
|
|
"github.com/coreos/etcd/pkg/pathutil"
|
|
|
- "github.com/ugorji/go/codec"
|
|
|
|
|
|
|
+ jsoniter "github.com/json-iterator/go"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
const (
|
|
@@ -658,7 +658,8 @@ func unmarshalHTTPResponse(code int, header http.Header, body []byte) (res *Resp
|
|
|
|
|
|
|
|
func unmarshalSuccessfulKeysResponse(header http.Header, body []byte) (*Response, error) {
|
|
func unmarshalSuccessfulKeysResponse(header http.Header, body []byte) (*Response, error) {
|
|
|
var res Response
|
|
var res Response
|
|
|
- err := codec.NewDecoderBytes(body, new(codec.JsonHandle)).Decode(&res)
|
|
|
|
|
|
|
+ var json = jsoniter.ConfigCompatibleWithStandardLibrary
|
|
|
|
|
+ err := json.Unmarshal(body, &res)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return nil, ErrInvalidJSON
|
|
return nil, ErrInvalidJSON
|
|
|
}
|
|
}
|