func (r DataResponse) MarshalJSON() ([]byte, error) {
	cfg := jsoniter.ConfigCompatibleWithStandardLibrary
	stream := cfg.BorrowStream(nil)
	defer cfg.ReturnStream(stream)
	writeDataResponseJSON(&r, stream)
	return stream.Buffer(), stream.Error  
}
MarshalJSON writes the results as json
package backend
import (
	"context"
	"encoding/json"
	"time"
	"github.com/grafana/grafana-plugin-sdk-go/data"
	jsoniter "github.com/json-iterator/go"
)
type QueryDataHandler interface {
	QueryData(ctx context.Context, req *QueryDataRequest) (*QueryDataResponse, error)
}
type QueryDataHandlerFunc func(ctx context.Context, req *QueryDataRequest) (*QueryDataResponse, error)
func (fn QueryDataHandlerFunc) QueryData(ctx context.Context, req *QueryDataRequest) (*QueryDataResponse, error) {
	return fn(ctx, req)
}
type QueryDataRequest struct {
	PluginContext PluginContext
	Headers       map[string]string
	Queries       []DataQuery
}
type DataQuery struct {
	RefID string
	QueryType string
	MaxDataPoints int64
	Interval time.Duration
	TimeRange TimeRange
	JSON json.RawMessage
}
type QueryDataResponse struct {
	Responses Responses
}
func (r QueryDataResponse) MarshalJSON() ([]byte, error) {
	cfg := jsoniter.ConfigCompatibleWithStandardLibrary
	stream := cfg.BorrowStream(nil)
	defer cfg.ReturnStream(stream)
	writeQueryDataResponseJSON(&r, stream)
	return stream.Buffer(), stream.Error
}
func (r *QueryDataResponse) UnmarshalJSON(b []byte) error {
	iter := jsoniter.ParseBytes(jsoniter.ConfigDefault, b)
	readQueryDataResultsJSON(r, iter)
	return iter.Error
}
func NewQueryDataResponse() *QueryDataResponse {
	return &QueryDataResponse{
		Responses: make(Responses),
	}
}
type Responses map[string]DataResponse
type DataResponse struct {
	Frames data.Frames
	Error error
}