The blue social bookmark and publication sharing system.
Log in with your username.
I've lost my password.
Log in with your OpenID-Provider.
@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; } }