Class BaseContent

java.lang.Object
com.bytedesk.core.base.BaseContent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ArticleContent, AudioContent, ButtonContent, DocumentContent, EmailContent, FileContent, FormContent, GoodsContent, ImageContent, InviteContent, LeaveMsgContent, LinkContent, LocationContent, MusicContent, OrderContent, QueueContent, QueueNotification, QuotationContent, RateContent, RobotContent, StickerContent, TicketContent, TransferContent, VideoContent, VoiceContent, WelcomeContent

@MappedSuperclass public abstract class BaseContent extends Object implements Serializable
See Also:
  • Field Details

  • Constructor Details

    • BaseContent

      public BaseContent()
  • Method Details

    • toJson

      public String toJson()
    • fromJson

      public static <T extends BaseContent> T fromJson(String json, Class<T> clazz)
      通用的JSON反序列化方法
      Parameters:
      json - JSON字符串
      clazz - 目标类类型
      Returns:
      反序列化后的对象