XStream or Simple

前端 未结 9 1269
栀梦
栀梦 2021-02-06 08:05

I need to decide on which one to use. My case is pretty simple. I need to convert a simple POJO/Bean to XML, and then back. Nothing special.

One thing I am looking for

9条回答
  •  日久生厌
    2021-02-06 08:39

    One "simple" (pun intended) disadvantage of Simple and Jaxb is that they require annotating your objects before they can be serialized to XML. What happens the day you quickly want to serialize someone else's code with objects that are not annotated? If you can see that happening one day, XStream is a better fit. (Sometimes it really just boils down to simple requirements like this to drive your decisions).

提交回复
热议问题