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

org.hibernate.search.backend.elasticsearch.impl.GsonBuilderHolder Maven / Gradle / Ivy

There is a newer version: 5.6.0.Alpha3
Show newest version
/*
 * 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.backend.elasticsearch.impl;

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

import io.searchbox.client.AbstractJestClient;

/**
 * Centralizes the configuration of the Gson builder.
 *
 * @author Guillaume Smet
 */
public class GsonBuilderHolder {

	private GsonBuilderHolder() {
	}

	public static final Gson BUILDER = new GsonBuilder()
			.setDateFormat( AbstractJestClient.ELASTIC_SEARCH_DATE_FORMAT )
			.serializeNulls()
			.create();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy