XStream or Simple

前端 未结 9 1462
栀梦
栀梦 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:36

    Why not use JAXB instead?

    • 100% schema coverage
    • Huge user base
    • Multiple implementations (in case you hit a bug in one)
    • Included in Java SE 6, compatible with JDK 1.5
    • Binding layer for JAX-WS (Web Services)
    • Binding layer for JAX-RS (Rest)
    • Compatible with JSON (when used with libraries such as Jettison)

    Useful resources:

    • Comparison, JAXB & XStream
    • Comparison, JAXB & Simple

提交回复
热议问题