making jsonSerializer a trait so we can extend it elsewhere and excluding null and empty fields from serialization