use json unmarshal/marshal from jsoniter in hotpaths (#12269)

This commit is contained in:
Harshavardhana
2021-05-11 02:02:32 -07:00
committed by GitHub
parent 14849b9b2c
commit b81fada834
8 changed files with 16 additions and 4 deletions

View File

@@ -29,6 +29,7 @@ import (
"unicode/utf8"
jwtgo "github.com/dgrijalva/jwt-go"
jsoniter "github.com/json-iterator/go"
"github.com/minio/madmin-go"
"github.com/minio/minio-go/v7/pkg/set"
"github.com/minio/minio/cmd/config"
@@ -124,6 +125,7 @@ func getIAMConfig(item interface{}, data []byte, itemPath string) error {
}
}
}
var json = jsoniter.ConfigCompatibleWithStandardLibrary
return json.Unmarshal(data, item)
}