func normalizeMapStrSlice(maps []MapStr, keys ...string) ([]MapStr, []error) {
	var errs []error
	out := make([]MapStr, 0, len(maps))
	for i, m := range maps {
		normalizedMap, err := normalizeMap(m, append(keys, strconv.Itoa(i))...)
		if len(err) > 0 {
			errs = append(errs, err...)
		}
		out = append(out, normalizedMap)
	}
	return out, errs
}
normalizeMapStrSlice normalizes each individual MapStr.
package common
import (
	"encoding"
	"encoding/json"
	"fmt"
	"reflect"
	"strconv"
	"strings"
	"github.com/elastic/beats/libbeat/logp"
	"github.com/pkg/errors"
)
const eventDebugSelector = "event"
var eventDebugf = logp.MakeDebug(eventDebugSelector)
var textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem()
type Float float64
func ConvertToGenericEvent(m MapStr) MapStr {
	keys := make([]string, 0, 10)
	event, errs := normalizeMap(m, keys...)
	if len(errs) > 0 {
		logp.Warn("Unsuccessful conversion to generic event: %v errors: %v, "+
			"event=%#v", len(errs), errs, m)
	}
	return event
}
func normalizeMap(m MapStr, keys ...string) (MapStr, []error) {
	var errs []error
	out := make(MapStr, len(m))
	for key, value := range m {
		v, err := normalizeValue(value, append(keys, key)...)
		if len(err) > 0 {
			errs = append(errs, err...)
		}
		if v == nil {
			if logp.IsDebug(eventDebugSelector) {
				eventDebugf("Dropped nil value from event where key=%v", joinKeys(append(keys, key)...))
			}
			continue
		}
		out[key] = v
	}
	return out, errs
}