package com.coreoz.plume.jersey.jackson;

import javax.inject.Provider;
import javax.inject.Singleton;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;

// check https://github.com/FasterXML/jackson-databind/issues/779 to see when we can have the SafeObjectMapper
@Singleton
public class ObjectMapperProvider implements Provider<ObjectMapper> {

	private final ObjectMapper objectMapper = new ObjectMapper()
		.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS)
		.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);

	@Override
	public ObjectMapper get() {
		return objectMapper;
	}

}

@@ -270,16 +270,77 @@
 Feature;
+%0Aimport com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
 %0A%0A// che
@@ -588,16 +588,115 @@
 apper()%0A
+%09%09.registerModule(new JavaTimeModule())%0A%09%09.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)%0A
 %09%09.disab

Add Java 8 Time serialization feature for Jackson