package com.sailthru.client;

import com.google.gson.JsonSerializer;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonNull;
import java.lang.reflect.Type;
import java.util.Map;


/**
 * Created with IntelliJ IDEA.
 * User: dennisyu
 * Date: 8/5/13
 * Time: 4:41 PM
 * To change this template use File | Settings | File Templates.
 */
public class NullSerializingMapSerializer implements JsonSerializer<Map> {
    private static final Gson gson = (new GsonBuilder()).serializeNulls().create();
    public JsonElement serialize(Map map, Type typeOfSrc, JsonSerializationContext context) {
        if(map == null) {
            return new JsonNull();
        }
        return new JsonPrimitive(gson.toJson(map));
    }
}
@@ -342,163 +342,8 @@
 ;%0A%0A%0A
-/**%0A * Created with IntelliJ IDEA.%0A * User: dennisyu%0A * Date: 8/5/13%0A * Time: 4:41 PM%0A * To change this template use File %7C Settings %7C File Templates.%0A */%0A
 publ
@@ -721,8 +721,9 @@
 %0A    %7D%0A%7D
+%0A

Remove auto generated code by Intellj