Class ThrowableSerializer

java.lang.Object
de.qytera.qtaf.core.gson.serializer.ThrowableSerializer
All Implemented Interfaces:
com.google.gson.JsonSerializer<Throwable>, IQtafJsonSerializer

public class ThrowableSerializer extends Object implements IQtafJsonSerializer, com.google.gson.JsonSerializer<Throwable>
Converts Throwable object to JSON.
  • Constructor Details

    • ThrowableSerializer

      public ThrowableSerializer()
  • Method Details

    • serialize

      public com.google.gson.JsonElement serialize(Throwable error, Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<Throwable>
    • getSerializedObjectClass

      public Class<Throwable> getSerializedObjectClass()
      Description copied from interface: IQtafJsonSerializer
      Returns the class of the serialized object.
      Specified by:
      getSerializedObjectClass in interface IQtafJsonSerializer
      Returns:
      the serialized class