Class GsonRichTextElementFactory

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

public class GsonRichTextElementFactory
extends java.lang.Object
implements com.google.gson.JsonDeserializer<RichTextElement>, com.google.gson.JsonSerializer<RichTextElement>
https://api.slack.com/changelog/2019-09-what-they-see-is-what-you-get-and-more-and-less
  • Constructor Summary

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

    Modifier and Type Method Description
    RichTextElement deserialize​(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context)  
    static java.lang.Class<? extends RichTextElement> detectElementClass​(java.lang.String className)
    Deprecated.
    com.google.gson.JsonElement serialize​(RichTextElement 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 RichTextElement 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<RichTextElement>
      Throws:
      com.google.gson.JsonParseException
    • serialize

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

      @Deprecated public static java.lang.Class<? extends RichTextElement> detectElementClass​(java.lang.String className)
      Deprecated.