Class GsonContextBlockElementFactory

java.lang.Object
com.slack.api.util.json.GsonContextBlockElementFactory
All Implemented Interfaces:
com.google.gson.JsonDeserializer<ContextBlockElement>, com.google.gson.JsonSerializer<ContextBlockElement>

public class GsonContextBlockElementFactory extends Object implements com.google.gson.JsonDeserializer<ContextBlockElement>, com.google.gson.JsonSerializer<ContextBlockElement>
Factory for deserializing BlockKit 'context block' elements from a chat message response.
See Also:
  • Constructor Details

    • GsonContextBlockElementFactory

      public GsonContextBlockElementFactory()
    • GsonContextBlockElementFactory

      public GsonContextBlockElementFactory(boolean failOnUnknownProperties)
  • Method Details

    • deserialize

      public ContextBlockElement deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<ContextBlockElement>
      Throws:
      com.google.gson.JsonParseException
    • serialize

      public com.google.gson.JsonElement serialize(ContextBlockElement src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<ContextBlockElement>