Search in sources :

Example 1 with ListResponseFidoDeviceSerializer

use of org.gluu.oxtrust.service.antlr.scimFilter.util.ListResponseFidoDeviceSerializer in project oxTrust by GluuFederation.

the class FidoDeviceWebService method serializeToJson.

private String serializeToJson(Object object, String attributesArray) throws Exception {
    ObjectMapper mapper = new ObjectMapper();
    mapper.disable(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS);
    SimpleModule customScimFilterModule = new SimpleModule("CustomScim2FidoDeviceFilterModule", new Version(1, 0, 0, ""));
    ListResponseFidoDeviceSerializer serializer = new ListResponseFidoDeviceSerializer();
    serializer.setAttributesArray(attributesArray);
    customScimFilterModule.addSerializer(FidoDevice.class, serializer);
    mapper.registerModule(customScimFilterModule);
    return mapper.writeValueAsString(object);
}
Also used : ListResponseFidoDeviceSerializer(org.gluu.oxtrust.service.antlr.scimFilter.util.ListResponseFidoDeviceSerializer) Version(org.codehaus.jackson.Version) ObjectMapper(org.codehaus.jackson.map.ObjectMapper) SimpleModule(org.codehaus.jackson.map.module.SimpleModule)

Aggregations

Version (org.codehaus.jackson.Version)1 ObjectMapper (org.codehaus.jackson.map.ObjectMapper)1 SimpleModule (org.codehaus.jackson.map.module.SimpleModule)1 ListResponseFidoDeviceSerializer (org.gluu.oxtrust.service.antlr.scimFilter.util.ListResponseFidoDeviceSerializer)1