Class GsonLayoutBlockFactory

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

public class GsonLayoutBlockFactory
extends java.lang.Object
implements com.google.gson.JsonDeserializer<LayoutBlock>, com.google.gson.JsonSerializer<LayoutBlock>
Factory for deserializing BlockKit elements from a chat message response.
  • Constructor Summary

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

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

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