use of org.gluu.oxtrust.service.scim2.schema.strategy.serializers.SchemaTypeAbstractSerializer in project oxTrust by GluuFederation.
the class SchemaWebService method serialize.
private String serialize(Serializable serializable) throws Exception {
ObjectMapper mapper = new ObjectMapper();
mapper.disable(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS);
SimpleModule customSchemaTypeAstractModule = new SimpleModule("CustomSchemaTypeAbstractModule", new Version(1, 0, 0, ""));
SchemaTypeAbstractSerializer serializer = new SchemaTypeAbstractSerializer();
customSchemaTypeAstractModule.addSerializer(SchemaType.class, serializer);
mapper.registerModule(customSchemaTypeAstractModule);
return mapper.writeValueAsString(serializable);
}
Aggregations