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

This commit is contained in:
Harshavardhana authored and GitHub committed 2021-05-11 02:02:32 -07:00
1 parent 14849b9b2c
commit b81fada834
8 files changed
+16 -4

No files matched your search

+1 -1
View File
@@ -26,7 +26,6 @@ import (
"crypto"
"crypto/hmac"
"encoding/base64"
"encoding/json"
"fmt"
"strings"
"sync"
@@ -188,6 +187,7 @@ func (c *MapClaims) Map() map[string]interface{} {
// MarshalJSON marshals the MapClaims struct
func (c *MapClaims) MarshalJSON() ([]byte, error) {
var json = jsoniter.ConfigCompatibleWithStandardLibrary
return json.Marshal(c.MapClaims)
}