io.gitee.huangguiming.Imcode.utils.IMGsonBuilder Maven / Gradle / Ivy
package io.gitee.huangguiming.Imcode.utils;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import io.gitee.huangguiming.Imcode.adapter.IMErrorAdapter;
import io.gitee.huangguiming.Imcode.exception.IMError;
public class IMGsonBuilder {
private static final GsonBuilder INSTANCE = new GsonBuilder();
static {
INSTANCE.registerTypeAdapter(IMError.class,new IMErrorAdapter());
}
public static Gson create() {
return INSTANCE.create();
}
}