I'm learning RESTful webservices using Java (Wildfly server), during a video, the tutor said the JAXB converts an object to xml, then converts that xml to JSON.
So in order to have XML document, we need to annotate our class with `@XmlRootElement`, but to get JSON, we can omit the `@XmlRootElement`. 
So if, under the hood, JAXB converts the document to xml in order to get josn, and we can omit `@XmlRootElement` for json, why is it required for XML documents?