From 15bb861459c4a67f14758f8aca2afb1b9b0e43a1 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Mon, 25 Feb 2019 17:52:10 -0800 Subject: [PATCH] Prevents `Object` from being serialized on the `Event` resource --- event.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/event.go b/event.go index b8a90e1743..973e6c2086 100644 --- a/event.go +++ b/event.go @@ -33,7 +33,10 @@ type EventRequest struct { // EventData is the unmarshalled object as a map. type EventData struct { - Object map[string]interface{} + // Object is a raw mapping of the API resource contained in the event. + // Although marked with json:"-", it's still populated independently by + // a custom UnmarshalJSON implementation. + Object map[string]interface{} `json:"-"` PreviousAttributes map[string]interface{} `json:"previous_attributes"` Raw json.RawMessage `json:"object"` }