Class ThrowableJsonSerializer

  • All Implemented Interfaces:
    com.google.gson.JsonSerializer<java.lang.Throwable>

    public class ThrowableJsonSerializer
    extends java.lang.Object
    implements com.google.gson.JsonSerializer<java.lang.Throwable>
    Serializer of a Throwable.

    Only the field "message" is serialized during the process.

    Since:
    2.0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.gson.JsonElement serialize​(java.lang.Throwable exception, java.lang.reflect.Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)
      • Methods inherited from class java.lang.Object

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

      • ThrowableJsonSerializer

        public ThrowableJsonSerializer()
    • Method Detail

      • serialize

        public com.google.gson.JsonElement serialize​(java.lang.Throwable exception,
                                                     java.lang.reflect.Type type,
                                                     com.google.gson.JsonSerializationContext jsonSerializationContext)
        Specified by:
        serialize in interface com.google.gson.JsonSerializer<java.lang.Throwable>
        Since:
        2.0.0