Configured encoding when serializing events