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

org.hibernate.search.elasticsearch.impl.DefaultGsonService Maven / Gradle / Ivy

/*
 * Hibernate Search, full-text search for your domain model
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.search.elasticsearch.impl;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import io.searchbox.client.AbstractJestClient;

/**
 * @author Guillaume Smet
 */
public class DefaultGsonService implements GsonService {

	private final Gson gson = new GsonBuilder()
			.setDateFormat( AbstractJestClient.ELASTIC_SEARCH_DATE_FORMAT )
			.serializeNulls()
			.create();

	public Gson getGson() {
		return gson;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy