Replace standard json encoding with jsoniter

This commit is contained in:
Manuel de Brito Fontes 2018-09-22 14:25:01 -03:00
parent 0fd87a7e56
commit 91ae204f6c
5 changed files with 25 additions and 7 deletions

View file

@ -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"] {