com.ecwid.consul.json.GsonFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of consul-api Show documentation
Show all versions of consul-api Show documentation
Java client for Consul HTTP API (http://consul.io)
package com.ecwid.consul.json;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
/**
* @author Vasily Vasilkov ([email protected])
*/
public class GsonFactory {
private static final GsonBuilder GSON_BUILDER = new GsonBuilder();
private static final ThreadLocal GSON = new ThreadLocal() {
@Override
protected Gson initialValue() {
return GSON_BUILDER.create();
}
};
public static Gson getGson() {
return GSON.get();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy