Search in sources :

Example 1 with Dom4jDocumentJsonSerializer

use of org.craftercms.core.util.json.jackson.Dom4jDocumentJsonSerializer in project core by craftercms.

the class Dom4JDocumentJsonSerializerTest method setUpTestObjectMapper.

private void setUpTestObjectMapper() {
    Dom4jDocumentJsonSerializer serializer = new Dom4jDocumentJsonSerializer();
    List<JsonSerializer<?>> serializers = new ArrayList<>();
    serializers.add(serializer);
    objectMapper = new CustomSerializationObjectMapper();
    objectMapper.setSerializers(serializers);
    objectMapper.init();
}
Also used : ArrayList(java.util.ArrayList) Dom4jDocumentJsonSerializer(org.craftercms.core.util.json.jackson.Dom4jDocumentJsonSerializer) Dom4jDocumentJsonSerializer(org.craftercms.core.util.json.jackson.Dom4jDocumentJsonSerializer) JsonSerializer(com.fasterxml.jackson.databind.JsonSerializer) CustomSerializationObjectMapper(org.craftercms.commons.jackson.CustomSerializationObjectMapper)

Aggregations

JsonSerializer (com.fasterxml.jackson.databind.JsonSerializer)1 ArrayList (java.util.ArrayList)1 CustomSerializationObjectMapper (org.craftercms.commons.jackson.CustomSerializationObjectMapper)1 Dom4jDocumentJsonSerializer (org.craftercms.core.util.json.jackson.Dom4jDocumentJsonSerializer)1