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 java.lang.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:
Context Blocks
  • Constructor Summary

    Constructors 
    Constructor Description
    GsonContextBlockElementFactory()  
    GsonContextBlockElementFactory​(boolean failOnUnknownProperties)  
  • Method Summary

    Modifier and Type Method Description
    ContextBlockElement deserialize​(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context)  
    com.google.gson.JsonElement serialize​(ContextBlockElement src, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)  

    Methods inherited from class java.lang.Object

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

  • Method Details

    • deserialize

      public ContextBlockElement deserialize​(com.google.gson.JsonElement json, java.lang.reflect.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, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<ContextBlockElement>