i use value object as the json which return to android client such that
public class StationVO implements Serializable{
private static final long serialVersionUID = 1692896969987787366L;
private String stationName;
private Long stationID;
private Double stationLng;
private Double stationLat;
}
but my partner let me change as
public class StationVO implements Serializable{
private static final long serialVersionUID = 1692896969987787366L;
private String stationName="";
private long stationID;
private double stationLng;
private double stationLat;
}
because he think if you use object,the json my be have null,it can cause client application error,even down,but i think if i use double the nullexception may be hidden,but i cant find the error. besides if i use double,the original null change 0,could cause the unreal data. so how can i avoid return null and i can find the nullexceptin or others to locate the exception?