How to let JAXB render boolean as 0 and 1, not true and false

前端 未结 5 1611
死守一世寂寞
死守一世寂寞 2020-12-08 19:53

Got a quick question. Does anyone know how to let JAXB (marshall) render boolean fields as 1 and 0 instead of printing out \"true\" and \"false\"?

5条回答
  •  無奈伤痛
    2020-12-08 20:35

    You can write a pair of parser/writers and define the property mapping in binding JAXB XML.

提交回复
热议问题