All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ecwid.consul.json.GsonFactory Maven / Gradle / Ivy

There is a newer version: 1.4.5
Show newest version
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