// Path: dashboard/src/main/java/nl/crowndov/displaydirect/dashboard/util/GsonFactory.java
// public class GsonFactory {
// 
//     public static Gson get() {
//         final GsonBuilder gsonBuilder = new GsonBuilder();
//         return gsonBuilder
//                 .registerTypeAdapter(LocalDate.class, new DateAdapter())
//                 .registerTypeAdapter(LocalDateTime.class, new DateTimeAdapter())
//                 .create();
//     }
// }


import com.google.gson.Gson;
import nl.crowndov.displaydirect.dashboard.util.GsonFactory;
import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.MessageBodyReader;
import javax.ws.rs.ext.MessageBodyWriter;
import javax.ws.rs.ext.Provider;
import java.io.*;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
package nl.crowndov.displaydirect.dashboard;



/**
 * Copyright 2017 CROW-NDOV
 *
 * This file is subject to the terms and conditions defined in file 'LICENSE.txt', which is part of this source code package.
 */
@Provider
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public final class GsonMessageBodyHandler implements MessageBodyWriter<Object>,
        MessageBodyReader<Object> {

    private static final String UTF_8 = "UTF-8";

    private Gson gson;

    private Gson getGson() {
        if (gson == null) {
// Path: dashboard/src/main/java/nl/crowndov/displaydirect/dashboard/util/GsonFactory.java
// public class GsonFactory {
// 
//     public static Gson get() {
//         final GsonBuilder gsonBuilder = new GsonBuilder();
//         return gsonBuilder
//                 .registerTypeAdapter(LocalDate.class, new DateAdapter())
//                 .registerTypeAdapter(LocalDateTime.class, new DateTimeAdapter())
//                 .create();
//     }
// }


// Path: dashboard/src/main/java/nl/crowndov/displaydirect/dashboard/GsonMessageBodyHandler.java
import com.google.gson.Gson;
import nl.crowndov.displaydirect.dashboard.util.GsonFactory;
import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.MessageBodyReader;
import javax.ws.rs.ext.MessageBodyWriter;
import javax.ws.rs.ext.Provider;
import java.io.*;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;

package nl.crowndov.displaydirect.dashboard;



/**
 * Copyright 2017 CROW-NDOV
 *
 * This file is subject to the terms and conditions defined in file 'LICENSE.txt', which is part of this source code package.
 */
@Provider
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public final class GsonMessageBodyHandler implements MessageBodyWriter<Object>,
        MessageBodyReader<Object> {

    private static final String UTF_8 = "UTF-8";

    private Gson gson;

    private Gson getGson() {
        if (gson == null) {
            gson = GsonFactory.get();