My question is how to convert the Integer value 0 to null? Previously I used the Xmappr annotation and it worked good with this annotation:
@Text
Now I have to use BeanIO, so I tried:
@Field(xmlType=XmlType.Text)
and it's not working.
The unit test needs to read number from XML file to be succesfull. If the personNumber from XML equals 0, it has to be written in the array as a null. In that case, the array should looks like this: [1,2,null].
XML file:
<Person ...> 1 </Person>
.
.
<Person ...> 2 </Person>
.
.
<Person ...> 0 </Person>
Annotation in Java previously:
@Text
private Integer personNumber;
Annotation in Java now:
@Field(xmlType=XmlType.Text)
private Integer personNumber;
Could it be the thing that I have to specify the format in the field annotation:
@Field(xmlType=XmlType.Text, format=....)
private Integer personNumber;
If so, what format should be specify?