jackson serialization is excluding double value 0.0
Problem here is with:
objectMapper.setSerializationInclusion(Include.NON_DEFAULT);
Double value 0.0 is considered as a default one and Jackson ignores it. After removing this line everything should work. If you don't want boolean valid = false to be included add @JsonInclude annotation for valid field like this:
@JsonInclude(Include.NON_DEFAULT)boolean valid = false;