Remove Encoding from serialization methods, get from constructor injection instead