Skip to content

Commit

Permalink
Merge pull request #5 from vulncheck-oss/preserve-order
Browse files Browse the repository at this point in the history
⚗️ preserve JSON key order from the API
  • Loading branch information
acidjazz authored Nov 12, 2024
2 parents cfed117 + be7c72a commit 87555f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

0 comments on commit 87555f5

Please sign in to comment.