I'm including Instance of Following class in one of my REST Resource Response.
public class GenericResponse<T> implements Serializable {
private String message;
private String errorMessage;
private String errorCode = "0";
....
}
There are other fields in this class but, when a field is null or "0" (as a String), they are being omitted in the Client's Response.
How to include all fields in the Client's REST response even though they are null/empty/0
Additional Information: Jersey Version: 2.6
I solved this with the Annotation
on