From d8a0eb7a5859c0a5db5c36823a0c258ad1571013 Mon Sep 17 00:00:00 2001 From: Allie Date: Wed, 5 Jun 2019 19:33:44 -0700 Subject: [PATCH] change Response.Data to json.RawMessage To allow unmarshaling directly into swagger type --- bitmex/bitmex.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bitmex/bitmex.go b/bitmex/bitmex.go index b0f2a69..c91e3f8 100644 --- a/bitmex/bitmex.go +++ b/bitmex/bitmex.go @@ -5,12 +5,12 @@ import ( ) type Response struct { - Success bool `json:"success,omitempty"` - Subscribe string `json:"subscribe,omitempty"` - Request interface{} `json:"request,omitempty"` - Table string `json:"table,omitempty"` - Action string `json:"action,omitempty"` - Data interface{} `json:"data,omitempty"` + Success bool `json:"success,omitempty"` + Subscribe string `json:"subscribe,omitempty"` + Request interface{} `json:"request,omitempty"` + Table string `json:"table,omitempty"` + Action string `json:"action,omitempty"` + Data json.RawMessage `json:"data,omitempty"` } func DecodeMessage(message []byte) (Response, error) {