From be7c72a271963afd5dac4f2c6b68f7f62378da06 Mon Sep 17 00:00:00 2001 From: kevin olson Date: Thu, 7 Nov 2024 14:44:51 -0600 Subject: [PATCH] =?UTF-8?q?=E2=9A=97=EF=B8=8F=20attempt=20to=20preserve=20?= =?UTF-8?q?JSON=20key=20order=20from=20the=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.go b/index.go index 8fe240c..af272e8 100644 --- a/index.go +++ b/index.go @@ -60,9 +60,9 @@ type IndexMetaParameters struct { } type IndexResponse struct { - Benchmark float64 `json:"_benchmark"` - Meta IndexMeta `json:"_meta"` - Data []interface{} `json:"data"` + Benchmark float64 `json:"_benchmark"` + Meta IndexMeta `json:"_meta"` + Data []json.RawMessage `json:"data"` } // add method to set query parameters @@ -189,6 +189,6 @@ func (r IndexResponse) String() string { } // GetData - Returns the data from the response -func (r IndexResponse) GetData() []interface{} { +func (r IndexResponse) GetData() []json.RawMessage { return r.Data }