Metrics API: Use jsoniter for JSON encoding (#30250)
* QueryMetricsV2: Stream response Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * API: Use jsoniter instead of standard JSON package Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
+2
-1
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/components/null"
|
||||
"github.com/grafana/grafana/pkg/components/simplejson"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
)
|
||||
|
||||
// TsdbQuery contains all information about a query request.
|
||||
@@ -263,5 +264,5 @@ func (df *dataFrames) MarshalJSON() ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return json.Marshal(encoded)
|
||||
return jsoniter.Marshal(encoded)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user