package pl.it_crowd.youtrack.api; import pl.it_crowd.youtrack.api.rest.ObjectFactory; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import java.io.Reader; import java.io.StringReader; public final class YoutrackUnmarshaller { // -------------------------- STATIC METHODS -------------------------- public static Object unmarshall(String string) throws JAXBException { return unmarshall(new StringReader(string)); } public static Object unmarshall(Reader reader) throws JAXBException { return JAXBContext.newInstance(ObjectFactory.class).createUnmarshaller().unmarshal(reader); } // --------------------------- CONSTRUCTORS --------------------------- private YoutrackUnmarshaller() { } }