package fi.csc.chipster.rest;

import javax.ws.rs.ext.ContextResolver;
import javax.ws.rs.ext.Provider;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

@Provider
public class JavaTimeObjectMapperProvider implements ContextResolver<ObjectMapper> {

    @Override
    public ObjectMapper getContext(Class<?> type) {
    	return new ObjectMapper()
		.registerModule(new JavaTimeModule())
		.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
		//.configure(SerializationFeature.INDENT_OUTPUT, true)
		;
    }
}

@@ -25,35 +25,37 @@
 rest;%0A%0Aimport ja
-vax
+karta
 .ws.rs.ext.Conte
@@ -79,11 +79,13 @@
 t ja
-vax
+karta
 .ws.

Fix json timestamps