tonivade/zeromock

XML serialization/deserialization support

Closed this issue · 3 comments

Possible providers:

  • Jaxb, please NO!
  • Xstream, it seems old and discontinued
  • XMLEncoder/XMLDecoder, It works?
  • org.json.XML, too simple?

Xstream, too many extra dependency. Ugly result.

XML, doesn't work.

When I try to serialize a {} the result is "", so I have to specify a root tag.
But when I try to deserialize the result is: {"body": null}

Implemented using Jaxb 😢

Thank $DEITY to his awesome features like:

  • Doesn't support classes with no empty default constructor. It does using a XmlAdapter 👎
  • Doesn't support classes without setter/getter. It does using @XmlAccessorType(FIELD), but fields should not be private or final. 👎
  • Needs to use awful annotations to work, like @XmlRootElement
  • Exceptions everywhere.

Wonderful design, no doubt.