Lesezeichen und Publikationen teilen - in blau!
Melden Sie sich mit Ihrem Benutzernamen an.
Ich habe mein Passwort vergessen.
Melden Sie sich mit Ihrem OpenID-Provider an.
@Provider public class JAXBContextResolver implements ContextResolver<JAXBContext> {
private JAXBContext context; private Class[] types = {ArrayWrapper.class};
public JAXBContextResolver() throws Exception { Map props = new HashMap<String, Object>(); props.put(JSONJAXBContext.JSON_NOTATION, "MAPPED"); props.put(JSONJAXBContext.JSON_ROOT_UNWRAPPING, Boolean.TRUE); props.put(JSONJAXBContext.JSON_ARRAYS, "[\"list\"]"); this.context = new JSONJAXBContext(types, props); }
public JAXBContext getContext(Class<?> objectType) { return (types[0].equals(objectType)) ? context : null; } }