Package org.notima.util.json
Class JsonUtil
java.lang.Object
org.notima.util.json.JsonUtil
A utility class to centralize the Json-formatting options. Mainly the date format and the field naming policy.
- Author:
- Daniel Tamm
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.gson.GsonReturns a default gson.static DateFormatcom.google.gson.Gsoncom.google.gson.Gsoncom.google.gson.GsongetGsonWithInterfaceAdapterFor(Type typeOfClass, Object adapter) static DateFormat
-
Constructor Details
-
JsonUtil
public JsonUtil()
-
-
Method Details
-
getDateFormat
-
getShortDateFormat
-
getDefaultGson
public com.google.gson.Gson getDefaultGson() -
getGsonWithExclusionStrategyForEntities
public com.google.gson.Gson getGsonWithExclusionStrategyForEntities() -
getGsonWithInterfaceAdapterFor
-
buildGson
public static com.google.gson.Gson buildGson()Returns a default gson.- Returns:
- A default gson.
-