Replace standard json encoding with jsoniter
This commit is contained in:
parent
0fd87a7e56
commit
91ae204f6c
5 changed files with 25 additions and 7 deletions
|
|
@ -18,12 +18,12 @@ package annotations
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os/exec"
|
||||
"time"
|
||||
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
"github.com/parnurzeal/gorequest"
|
||||
|
|
@ -90,7 +90,7 @@ var _ = framework.IngressNginxDescribe("Annotations - influxdb", func() {
|
|||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
var results map[string][]map[string]interface{}
|
||||
json.Unmarshal([]byte(measurements), &results)
|
||||
jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal([]byte(measurements), &results)
|
||||
|
||||
Expect(len(measurements)).ShouldNot(Equal(0))
|
||||
for _, elem := range results["results"] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue