Class GsonUtil


  • public final class GsonUtil
    extends java.lang.Object
    Includes a Gson object as member, which should protect for multiple creation of Gson instances
    See Also:
    Gson
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static com.google.gson.Gson GSON
      The Gson constant instance, which should use as a new Gson object instance The following attributes has with GsonBuilder.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • GSON

        public static final com.google.gson.Gson GSON
        The Gson constant instance, which should use as a new Gson object instance The following attributes has with GsonBuilder.

        The serializer has no pretty printing. You can use new JsonDocument(obj).toPrettyJson(); als alternative

        See Also:
        Gson, serializeNulls disableHtmlEscaping