Ignore null values and endpoint field when serializing