Class ThrowableSerializer

java.lang.Object
org.spincast.plugins.gson.serializers.ThrowableSerializer
All Implemented Interfaces:
com.google.gson.JsonSerializer<Throwable>

public class ThrowableSerializer extends Object implements com.google.gson.JsonSerializer<Throwable>
  • Constructor Details

    • ThrowableSerializer

      @Inject public ThrowableSerializer(org.spincast.core.json.JsonObjectFactory jsonObjectFactory, JsonObjectSerializer jsonObjectSerializer)
  • Method Details

    • getJsonObjectFactory

      protected org.spincast.core.json.JsonObjectFactory getJsonObjectFactory()
    • getJsonObjectSerializer

      protected JsonObjectSerializer getJsonObjectSerializer()
    • serialize

      public com.google.gson.JsonElement serialize(Throwable ex, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<Throwable>
    • toJsonObject

      protected org.spincast.core.json.JsonObject toJsonObject(Throwable ex)