Class JsonUtil

java.lang.Object
org.notima.util.json.JsonUtil

public class JsonUtil extends Object
A utility class to centralize the Json-formatting options. Mainly the date format and the field naming policy.
Author:
Daniel Tamm
  • Constructor Details

    • JsonUtil

      public JsonUtil()
  • Method Details

    • getDateFormat

      public static DateFormat getDateFormat()
    • getShortDateFormat

      public static DateFormat getShortDateFormat()
    • getDefaultGson

      public com.google.gson.Gson getDefaultGson()
    • getGsonWithExclusionStrategyForEntities

      public com.google.gson.Gson getGsonWithExclusionStrategyForEntities()
    • getGsonWithInterfaceAdapterFor

      public com.google.gson.Gson getGsonWithInterfaceAdapterFor(Type typeOfClass, Object adapter)
    • buildGson

      public static com.google.gson.Gson buildGson()
      Returns a default gson.
      Returns:
      A default gson.