add JSON omitempty for some fields