Interface ChatMessageJsonCodec

All Known Implementing Classes:
GsonChatMessageJsonCodec

public interface ChatMessageJsonCodec
A codec for serializing and deserializing ChatMessage objects to and from JSON.
  • Method Details

    • messageFromJson

      ChatMessage messageFromJson(String json)
      Deserializes a JSON string to a ChatMessage object.
      Parameters:
      json - the JSON string.
      Returns:
      the deserialized ChatMessage object.
    • messagesFromJson

      List<ChatMessage> messagesFromJson(String json)
      Deserializes a JSON string to a list of ChatMessage objects.
      Parameters:
      json - the JSON string.
      Returns:
      the deserialized list of ChatMessage objects.
    • messageToJson

      String messageToJson(ChatMessage message)
      Serializes a ChatMessage object to a JSON string.
      Parameters:
      message - the ChatMessage object.
      Returns:
      the serialized JSON string.
    • messagesToJson

      String messagesToJson(List<ChatMessage> messages)
      Serializes a list of ChatMessage objects to a JSON string.
      Parameters:
      messages - the list of ChatMessage objects.
      Returns:
      the serialized JSON string.