func toDebugEpEvents(events map[string][]*message.Message) map[string][]eventPlatformDebugEvent {
	result := make(map[string][]eventPlatformDebugEvent)
	for eventType, messages := range events {
		var events []eventPlatformDebugEvent
		for _, m := range messages {
			e := eventPlatformDebugEvent{EventType: eventType, RawEvent: string(m.Content)}
			err := json.Unmarshal([]byte(e.RawEvent), &e.UnmarshalledEvent)
			if err == nil {
				e.RawEvent = ""
			}
			events = append(events, e)
		}
		result[eventType] = events
	}
	return result
}
// toDebugEpEvents transforms the raw event platform messages to eventPlatformDebugEvents which are better for json formatting
toDebugEpEvents transforms the raw event platform messages to eventPlatformDebugEvents which are better for json formatting
// toDebugEpEvents transforms the raw event platform messages to eventPlatformDebugEvents which are better for json formatting
func toDebugEpEvents(events map[string][]*message.Message) map[string][]eventPlatformDebugEvent {
	result := make(map[string][]eventPlatformDebugEvent)
	for eventType, messages := range events {
		var events []eventPlatformDebugEvent
		for _, m := range messages {
			e := eventPlatformDebugEvent{EventType: eventType, RawEvent: string(m.Content)}
			err := json.Unmarshal([]byte(e.RawEvent), &e.UnmarshalledEvent)
			if err == nil {
				e.RawEvent = ""
			}
			events = append(events, e)
		}
		result[eventType] = events
	}
	return result
}
func toDebugEpEvents ( events map [ string ] [ ] * message . Message ) map [ string ] [ ] eventPlatformDebugEvent { result := make ( map [ string ] [ ] eventPlatformDebugEvent ) for eventType , messages := range events { var events [ ] eventPlatformDebugEvent for _ , m := range messages { e := eventPlatformDebugEvent { EventType : eventType , RawEvent : string ( m . Content ) } err := json . Unmarshal ( [ ] byte ( e . RawEvent ) , & e . UnmarshalledEvent ) if err == nil { e . RawEvent = " " } events = append ( events , e ) } result [ eventType ] = events } return result }
toDebugEpEvents transforms the raw event platform messages to eventPlatformDebugEvents which are better for json formatting
toDebugEpEvents transforms the raw event platform messages to eventPlatformDebugEvents which are better for json formatting