package com.perforce.hws.core.p4base;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.List;
import java.util.Map;
/**
* This is just a way of adding Gson to most classes quickly.
*
* TODO: I'm not sure where I should put this, we might want a "Json" package
*/
public interface HasGson {
Type stringMapType =
new TypeToken<Map<String, String>>() {}.getType();
Type objectMapType =
new TypeToken<Map<String, Object>>() {}.getType();
Type objectMapListType =
new TypeToken<List<Map<String, Object>>>() {}.getType();
Type configMapType =
new TypeToken<Map<String, Map<String,String>>>() {}.getType();
Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").create();
}