Class GsonTextObjectFactory

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

public class GsonTextObjectFactory
extends java.lang.Object
implements com.google.gson.JsonDeserializer<TextObject>, com.google.gson.JsonSerializer<TextObject>
Factory for deserializing BlockKit 'text object' elements from a chat message response.
See Also:
Text Composition Objects
  • Constructor Summary

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

    Modifier and Type Method Description
    TextObject deserialize​(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context)  
    com.google.gson.JsonElement serialize​(TextObject 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 TextObject 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<TextObject>
      Throws:
      com.google.gson.JsonParseException
    • serialize

      public com.google.gson.JsonElement serialize​(TextObject src, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<TextObject>