getSerializer should be static