Class GsonUtility


  • public class GsonUtility
    extends java.lang.Object
    A provider of Gson instances able to serialize instances of Stream (as arrays) and instances of PublicKey and PrivateKey (in JSON Web Key format).
    • Constructor Detail

      • GsonUtility

        public GsonUtility()
    • Method Detail

      • setup

        public static com.google.gson.GsonBuilder setup​(com.google.gson.GsonBuilder gsonBuilder)
        Sets up an instance of GsonBuilder to serialize streams and keys.
        Parameters:
        gsonBuilder - the GsonBuilder
        Returns:
      • getGson

        public static com.google.gson.Gson getGson()
        Returns a Gson.
      • getPrettyGson

        public static com.google.gson.Gson getPrettyGson()
        Returns a Gson which is configured for pretty-printing.